protected function find_categories_after($category) {
        $return = array();
        $categoryarray = $this->categories;
        foreach ($categoryarray as $categoryelement) {
            if ($categoryelement->after == $category->name) {
                // Find all categories that comes after this category as well.
                $categoryelement->sort_nodes();
                $return = array_merge($return, array($categoryelement->name => $categoryelement),
                        $this->find_categories_after($categoryelement));
            }
        }
        return $return;
    }