fix Issue 8220 - invalid function call not detected during semantic analysis
Merge pull request #1007 from 9rnsr/fix8220

[Repost] Issue 8220 - invalid function call not detected during semantic analysis