Sorting enumerations and generation of consts for enumfields with the same value + test