Small improvement to merge_vectors