Return query - refs BT#8340