Fix TR double cast bug

In some cases, TR tried to typecheck the contents of a quote-syntax
form that contains unexpanded syntax.

Closes PR 14355