Improved error reporting for arity inconsistency.