Better error when matching fails for apply
This is the first step towards better errors in apply. Next one is probably to factor out all the specific exceptions done by transformations with arguments. Not sure I handled "all good cases" in first_order_matching.