fix Issue 10296 - Nested template function call and purity inference bug
fix Issue 10254 - Purity correctness is broken with constructor