Fixed #18414 -- qs.exists() for sliced distinct queries