public function getNextLevel($context = null, $level = null) {
        if (is_null($context)) {
            $context = $this->getContext();
        }
        if (is_null($level)) {
            $level = $this->getLevel($context);
        }

        //Get all the levels
        $currentContext = $this->_upgradeStack[$context];
        ksort($currentContext);
        $levels = array_keys($currentContext);
        //Find the index of the current one
        $current = array_search($level, $levels);

        //And if it is present, return the next level
        if ($current !== false) {
            $current++;
            if (isset($levels[$current])) return $levels[$current];
        }

        //Else return current level +1 (doesn't exist anyway)
        return ++$level;
    }