private static function force_enable_settings(restore_controller $controller, array $settings) {
        $plan = $controller->get_plan();
        foreach ($settings as $config => $settingname) {
            $value = true;
            if ($plan->setting_exists($settingname)) {
                $setting = $plan->get_setting($settingname);
                // We do not allow this setting to be locked for a duplicate function.
                if ($setting->get_status() !== base_setting::NOT_LOCKED) {
                    $setting->set_status(base_setting::NOT_LOCKED);
                }
                $setting->set_value($value);
                $setting->set_status(base_setting::LOCKED_BY_CONFIG);
            } else {
                $controller->log('Unknown setting: ' . $settingname, BACKUP::LOG_DEBUG);
            }
        }
    }