ROOVY-6911: Incorrect parametrization of generic type leads to ArrayIndexOutOfBoundsException