Fix 'build query --exists'

 * Changes in a previous commit which attempted to fixup an edge-case failure
   in '--exists' managed to break it for all cases.