In MSVC, enums are signed, as are bitfields containing them. This often makes values at the extreme end of the enum range go negative, so they fail equality comparisons. I fixed this by always using unsigned for bitfields that hold enums, unless the enum actually uses negative values.
Created attachment 6880 [details] take 1 (kinda ugly)
Comment on attachment 6880 [details] take 1 (kinda ugly) r=me I didn't spot any problems. The trick with a change like this is to do enough testing.
Maciej landed this.