Weird that there was no test for this... This code is somewhat inefficient, because it will be performed for every arg, rather than only once.
We only want to check extra optional args if the proto function is variadic, not when we're adding extra variadic args.