GROOVY-6250: Parsing issue with enums using inner generic methods