HHH-8477 use unwrapped query