fix Issue 12306 - Struct Enums cannot be read at compile time