GROOVY-7058: Fix NPE in instantiation of trait'ed class due to missing generic type information in trait helper