GROOVY-6048: fix generics for static inner classes and inner interfaces