protected function forwardToLastModule()
    {
        $moduleData = BackendUtility::getModuleData(
            array('controller' => ''),
            array(),
            $this->argumentsKey
        );

        if ($moduleData['action'] === 'alert') {
            return;
        }

        // Don't need to check if it is an array because getModuleData always
        // returns an array. Only have to check if it's empty.
        if (!empty($moduleData)) {
            $currentController = $this->getControllerName();
            $currentAction = $this->getActionName();
            if ($moduleData['action'] !== '' && $moduleData['action'] !== $currentAction) {
                $this->forward($moduleData['action'], $moduleData['controller']);
            }
        }
    }