Add to and sort .pairs file
Use explicit ordering of queries to keep tiles in place

[Fixes #45689865]
[Fixes #45654157] Union multiple tags instead of intersecting