Sort enums to ensure that we get consistent ordering