PR libstdc++/82966 fix swapping of node handles