Fix @slow failure in test_query.