GROOVY-6475: Incorrect error while checking generics of AIC