GROOVY-6150: small tweaks, new tests
fix a test fail, clean code a bit