Fix a query in a query test and drop support for 1.6 branch