Only ReSubstTemplateParms on anything with a typedef.

(cherry picked from commit 384a4187dccc4a32d9e54981f4fc1c4005cae6e8)