If x is an element of type unsignedLong, then the expression x eq 3 compiles so that x's value, which is an unsignedLong, comes out of the infoset as a java.lang.Long but the constant 3 is a java.math.BigInteger, so comparison, which boils down to scala "==" operation, returns false.
The mistake, I think, is that this value, coming from element x, should a java.math.BigInteger becasue it is of type unsignedLong. It seems incorrect that the value is a java.lang.Long since that's not capable of representing the unsigned values that have the most-significant-bit on (unless its value is interpreted as a ULong).
In general, the way types are converged for the two arguments of an operation must be different depending on whether the operation is comparison or arithmetic. If comparison they must be converged to a type which can be compared properly.
The method numericBinaryOpTargetTypes doesn't consider whether the operation is a comparison or arithmetic.