Both constants are constant, but the expression x isn't constant since it resolves to different constants in different classes.
Then the problem is that x doesn't bind statically. If A::x is constant, and the use of "x" is statically bound, it should be statically bound to the constant value -1. Otherwise we have some other kind of binding for constants.