fix Issue 10296 - Nested template function call and purity inference bug
Merge pull request #2149 from 9rnsr/fix10296

Issue 10296 - Nested template function call and purity inference bug