This observation appears to be correct. I noticed when doing this that values set at the C++ level evaluated correctly, but values set through the editor would be offset as noted here. The only way to fix them was to explicitly set the integer value – not using hex or bit shift operators, but with a constant integer: 1, 2, 4. If I did that, everything behaved consistently.
It’s pretty inconvenient.