Fix D6 queries in tests.