public function getParent($name = NULL)
  {
    if (!$this->parent) {
      return FALSE;
    }
    if ($name) {
      if ($this->parent->getName() == $name) {
        return $this->parent;
      }
      if ($parent = $this->parent->getInclude($name)) {
        return $parent;
      }
      // Recurse up the tree to find if the parent is in the tree.
      return $this->parent->getParent($name);
    }
    return $this->parent;
  }