Issue 6312 - template instance cannot use argument from enclosing template

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