Preserve uniqness during query merging.