Update match_catalog to be faster for large numbers of halos