GROOVY-6640: Compilation warning when using @AutoClone on an object with collection properties
refactor some utility methods to a more logical place