GROOVY-6237: remove some usages of isUsingGenerics