Query skolemization for step 2