Rename merge->mergeSet and simplify so that it works in place.