private function fixUpViewConfig(array $config): array
    {
        foreach ($config['system'] as $scope => $scopeConfig) {
            if ($scope === 'default') {
                continue;
            }

            foreach (array_keys($scopeConfig['view']) as $viewName) {
                if (isset($config['system']['default']['view'][$viewName])) {
                    foreach ($config['system']['default']['view'][$viewName] as $context => $defaultRules) {
                        if (!isset($config['system'][$scope]['view'][$viewName][$context])) {
                            $config['system'][$scope]['view'][$viewName][$context] = [];
                        }

                        $config['system'][$scope]['view'][$viewName][$context] += $defaultRules;
                    }
                }
            }
        }

        return $config;
    }