Make collect-matches handle case sanely