GROOVY-6372: @Immutable fails to recognize non immutable classes (move the simple cases of matching on classname whitelist from runtime to compile time)