fix Issue 9977 - Function local templates should be allowed
Merge pull request #1919 from 9rnsr/fix9977

Issue 9977 - Function local templates should be allowed