Issue 10296 - Nested template function call and purity inference bug

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