When the operators <, <=, >, >= are used with two
operands neither of which can be determined at compile
time to be a singleton, the expression (A > B) is
rewritten as (min(A) gt max(B)) (and similarly for the
other operators). This rewrite is incorrect, because it
causes the expression to return an empty sequence
rather than false when one of the operands is an empty
(In most situations this won't matter, because the
effective boolean value of an empty sequence is false;
but the difference shows up when the expression is used
in a non-boolean context).
Source code fixed.