Ticket #6172: Properly grok %type%... template parameters.