Update Query again to version that deals with nonexistent queries correctly.