Issue 11843 - Template instantiated twice: failed semantic analysis

https://d.puremagic.com/issues/show_bug.cgi?id=11843