fix Issue 8504 - Template attribute inferrence doesn't work
Need more hack for bug 7757
Merge pull request #1096 from 9rnsr/fix8504

Issue 8504 - Template attribute inferrence doesn't work