Removing doubles from custom selector matches
Rev version