If more than one call to the current() function appears
within a predicate, the first occurrence is evaluated
correctly, but the second and subsequent occurrences
are evaluated as if they were ".".
Applies to 8.4 and previous releases.
This will be fixed in the next version by virtue of a
redesign of the way current() is handled. Meanwhile the
problem can usually be circumvented by using a variable.