[REG2.063a] Issue 10067 - Recursive template instantation

http://d.puremagic.com/issues/show_bug.cgi?id=10067