[Python3] Fix Tools/Scripts/check-for-invalid-symbols-in-version-script