Fix Issue 11198 - Error messages for declaring a 'version' inside main() and other functions are unclear
Merge pull request #2760 from yebblies/issue11198

Issue 11198 - Error messages for declaring a 'version' inside main() and other functions are unclear