Better with-handlers support in TR

Checks consistency between predicates and handlers in `with-handlers` clauses.
Potentially, but this should never error so it shouldn't matter.