GROOVY-6836: If joint compilation is active *and* that @CompileStatic is used with @Immutable, metaclasses are mixed