Fix endless recursion in setSpecializedFrom
This could be triggered by having the exactly same specialization occur twice in a single file. setSpecializedFrom would end up calling itself with the same TemplateDeclaration over and over again. Adding another recursion counter in the same way that other places already have one fixes the problem. Unfortunately I wasn't able to generate a test that exhibits the recursion problem.
Showing with 25 additions and 1 deletion