Fix strange compilation error to do with enum methods.