Add unbalanced set with insert doing d+1 comparisons and avoiding unnecessary copying when inserting an existing element.