[ST-547] Fix contact record filter

See the ticket for a summary, but this essentially makes filtering of contact records with the new UI behave properly. 
Personal opinion time: things like this list comprehension could either use some comments or self documentation. I know what it's doing, but I think that's because I was the person who discovered the issue in the first place.