You're using a hash for your multi-index.
That means the LogicalAnd
comparator never gets called unless something is found in the right hash bucket.
0x01
and 0xFF
don't hash to the same value even though 0x01 & 0xFF == 0x01
. That is, LogicalAnd
would return true, but it's never invoked.
You would need a hash function which is invariant wrt. LogicalAnd
, and I don't think that's possible. By design most hash functions are supposed to minimise collisions between different key values.
You need to come up with some different indexing system, I'm afraid.