Syntax checker reports the error in the global declarations, even though the error actually occurs in the local declaration of a template.
Might be a duplicate of bug 157.
Created attachment 38 [details] Test case.
Turns out to be the same problem as bug 157. *** This bug has been marked as a duplicate of 157 ***