fix Issue 12485 - [REG2.065] DMD crashes when recursive template expansion
Merge pull request #3683 from WalterBright/fix12485

fix Issue 12485 - [REG2.065] DMD crashes when recursive template expansion