Changed swap in insert to unqualified swap.