Fixes an IndexOutOfBoundsException. (Yeah, attempts at having cross-language enums are kinda fragile...)