 	}
 	fileprivate var estimatedHeight: CGFloat?
 	
-	fileprivate var flatIndex: Int?
+	fileprivate var flatIndex: Int? {
+		didSet {
+			if let old = oldValue, flatIndex == nil, parent?.flatIndex == old {
+				parent?.flatIndex = nil
+			}
+		}
+	}
 	
 	fileprivate var size: Int {
 		var size = isViewable ? 1 : 0

		delegate?.treeController?(self, commit: editingStyle, forNode: node)
	}
	
	//MARK: - UITableViewDelegate
	
	public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {

	}
	
	open var isExpandable: Bool = true
	open var canMove: Bool = false
	
	private var removeRange: CountableRange<Int>?
	open var isExpanded: Bool = true {
