fix Issue 11844 - ICE(template.c:6643) Assertion failed: (td->semanticRun != PASSinit)