fix Issue 9639 - Recursive template instanciation segfault dmd
Merge pull request #2878 from 9rnsr/fix9639

[REG2.062] Issue 9639 - Recursive template instanciation segfault dmd