Better errors on arity mismatch for the apply tactic

Fixes #18