public function rebuildBounds($node, $depth = 0)
{
$k = $this->scopedKey($node);
$node->setAttribute($node->getLeftColumnName(), $this->getNextBound($k));
$node->setAttribute($node->getDepthColumnName(), $depth);
foreach ($this->children($node) as $child) {
$this->rebuildBounds($child, $depth + 1);
}
$node->setAttribute($node->getRightColumnName(), $this->getNextBound($k));
$node->save();
}