Fix filtering for multiple uids
Before this only the primaryUID was used for name and email matching. Now all UIDs are searched. While this decreases perfomance it is the correct behavior.