This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The query contains where empty $input-context2//bid_tuple[itemno = $i/itemno]) that is missing a '(' between "empty" and "$input-context2"
The test case has been corrected as you suggested. Please close this bug if you agree with this solution and/or have verified this fix.