plug mem leak in selection_make_matchdeps