Fix buildSwigWrapperClasses.py after recent break.

A re-ordering of some enum values exposed a lingering bug where an
invalid key was indexing a dictionary.