do not clone enum structure when typing the enum statics, instead have a single cached reference (reduce memory usage for big enums) close #2300