fix Issue 9990 - templates with function alias cause forward reference error
Merge pull request #1936 from 9rnsr/fix9990

Issue 9990 - templates with function alias cause forward reference error