Incorrect optimizations are applied to the functions
boolean() and not() in the case where the argument is a
value comparison. This dates from an earlier version of
the spec in which a value comparison never returned an
The optimization causes boolean() to be treated as a
no-op in this situation, whereas it should actually
convert () to false(); similarly not() inverts the
condition (for example, [not(A gt B)] becomes [A le B])
whereas it should return true() if either operand is ().
Source code fixed.