TR: better keyword errors

Produces better errors when arities don't match up for a keyword function definition. I plan to make an equivalent change for optional argument functions too later.
This loop looks like it could be rewritten as two loops and then an `append`, which I think would be clearer.