Ticket #5506: Skip template parameters when determining whether a template is a declaration or a definition.
Merge pull request #244 from simartin/ticket_5506

Ticket #5506: Don't crash upon invalid template declaration