Don't assume cleanliness of item and query ids