LOG.debug("setting maxDepth = " + ownerDocument.getMaxDepth());
LOG.debug("setting maxDepth = " + ownerDocument.getMaxDepth() + "; current = " + level);
    private void checkTree(int size)            throws EXistException {        // check if the tree structure needs to be changed        int level = ownerDocument.getTreeLevel(gid);        if (ownerDocument.getMaxDepth() == level + 1) {            ownerDocument.incMaxDepth();            LOG.debug("setting maxDepth = " + ownerDocument.getMaxDepth());        }        if (ownerDocument.getTreeLevelOrder(level + 1) < children + size) {            // recompute the order of the tree            ownerDocument.setTreeLevelOrder(level + 1, children + size +                    ownerDocument.broker.getXUpdateGrowthFactor());            ownerDocument.calculateTreeLevelStartPoints(false);            if (ownerDocument.reindex < 0 || ownerDocument.reindex > level + 1) {                ownerDocument.reindex = level + 1;            }        }    }