protected function mergeModulePresencesIntoLayout(array $layout, MenuConfiguredModulesDataInterface $modules)
    {
        $standard = $modules->standard();

        $layout = $this->mergeModulePresencesIntoLayoutLayer($layout, $standard);

        // Append ungrouped presences to to the end of the layout
        $standard->each(function ($presences) use (&$layout) {
            /** @var MenuPresenceInterface[] $presences */
            foreach ($presences as $presence) {
                $layout[] = $presence;
            }
        });

        return $layout;
    }