Correctly set flags values when compiling with MOD_FLAGS in release mode.
Avoid generating early checks in release mode.