This is a reproduction for Groovy bug GROOVY-11265. To reproduce, run mvn test. To try it with different Groovy versions, run mvn -Dgroovy4.version=4.0.12 test.