Fix bug when using error callback and passing too many arguments

The enforcement of arguments didn't properly exit when iterating
past the end of the function's type information. This only surfaced
when using the error callback, because the callback doesn't interrupt
normal program flow (as opposed to fatal errors).