 
     public mutating func removeAll(keepCapacity keepCapacity: Bool = false) {
         nodes.removeAll(keepCapacity: keepCapacity)
+        root = nil
+        leftmost = nil
+        rightmost = nil
     }
     
     /// Remove the node at `handle`, invalidating all existing handles.

        let sc = sb + self[b1].head
        precondition(ordered((self, b1, sb), before: (tree, c2, sc)))

        var summary = sc
        var previous1 = b1
        var next2: Handle? = c2

    }

    public mutating func merge(tree: RedBlackTree<Config, Payload>) {
        self.reserveCapacity(self.count + tree.count)
        var handle = tree.leftmost
        var summary = Summary()
        while let h = handle {
