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