You're right; that definition of get_avatar does have 4 args, but here's what I think is happening (with apologies in advance if this looks like I'm lecturing you; that's not the intention).
With Add Local Avatars disabled ...
1. My plugin loads and calls add_filter for get_avatar specifying 5 arguments, which is what WP expects
2. All plugins have finished loaded so WP invokes pluggable.php, finds that there's no definition of get_avatar so it defines the WP standard version, which takes 4 arguments, of which only the 1st argument, $id_or_email is mandatory.
3. My plugin runs, calls (via a direct function call) get_avatar which is calling the version of this function defined in pluggable.php; this function calls apply_filters for get_avatar, specifying 5 arguments.
4. The call to apply_filters in turn calls all filters registered for get_avatar, which includes my plugin's filter hook code. Filter (and action) hooks are not called by direct function call but via _wp_call_all_hook (defined in plugin.php which devolves to a call to call_user_func_array where the number of arguments needs to match. My get_avatar filter hook takes 5 arguments. All is well.
Now I enable Add Local Avatar ...
1. My plugin loads and calls add_filter for get_avatar specifying 5 arguments, which is what WP expects
2. Add Local Avatar loads and plugs get_avatar (your template tag at line 1282 in avatar.php) with 4 arguments. Again, only the 1st argument is mandatory.
3. All plugins have loaded, WP invokes pluggable.php but this time there's already a definition (yours) of get_avatar so the WP version doesn't get defined.
4. My plugin runs, calls (via a direct function call) get_avatar which is calling the Add Local Avatar version of this function; this function calls apply_filters for get_avatar, specifying 4 arguments.
5. The call to apply_filters again devolves to a call to call_user_func_array which sees my get_avatar filter hook, tries to invoke it, but there's a mismatch on the number of arguments so PHP complains, giving the warning message in my original post.
So, after all that, the issue here is not that your plugged version of get_avatar has 4 arguments but that you're effectively redefining the argument count for the get_avatar filter.
Crucially, there's a difference between the (plugged) version of the get_avatar API call and the filter get_avatar; they may share the same name but they're different functions and take differing numbers of arguments; at least as far as the WordPress API is concerned.
If Add Local Avatar is the sole source of the (redefined) definition of and call to the get_avatar filter then this problem never occurs. But the moment that another theme or plugins uses the get_avatar filter then they will (hopefully) code against the WordPress version of the filter (with 5 arguments) and not the redefined version in Add Local Avatar.
Basically, the fix is trivial, just change your invocation of the get_avatar filter to agree with WordPress and all should be well.
Hope this all makes sense
-Gary