Ticket #6181: Properly handle >> terminating template parameter lists.
Merge pull request #484 from simartin/ticket_6181

Ticket #6181: Properly handle >> terminating template parameter lists.