 
     /// Invalidate this cursor.
     mutating func invalidate() {
-        root = Node()
+        root = Node(order: root.order)
         count = 0
         position = 0
         _path = []

        index.state.expectRoot(root)
        makeUnique()
        let cursor = BTreeCursor(BTreeCursorPath(root: root, slotsFrom: index.state))
        root = Node()
        defer { self.root = cursor.finish() }
        return try body(cursor)
    }

        precondition(position >= 0 && position <= count)
        makeUnique()
        let cursor = BTreeCursor(BTreeCursorPath(root: root, position: position))
        root = Node(order: self.order)
        defer { self.root = cursor.finish() }
        return try body(cursor)
    }
