Further simplify previous patch

Use a single XOR instead of NEGATE + AND

No functional change.