Add #:literal-sets for several TR optimizer cases

The matching was too inclusive in some cases, causing
spurious optimizations (or type-table lookup failures).

Closes PR 14380