[PD-457] Location sorting fix

Prevents duplicate contact cards from showing up when sorting by location. Rebased on top of my new merge branch.