Sort: Make `ignore_unmapped` work for cross-index queries.

Close #2255