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