private void detachInternal(Node root) {
        if (root instanceof ObservableHierarchy) {
            ((ObservableHierarchy) root).removeObserver(this);
        }
        for (Node node : root.getChildren()) {