Fixed an issue where the enum size could have been reduced by the compiler if optimization was turned on.