remote: fix a leak in query_matches_negative_refspec