Refactoring.
Fix type error message pruning for tc-any-results.
Avoid swallowing errors.

This hid the fact that error pruning was failing.
Refactoring.
Add tests for error message pruning.