Ticket #6172: Properly grok %type%... template parameters.
Merge pull request #483 from simartin/ticket_6172

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