diff --git a/core/modules/menu_ui/menu_ui.install b/core/modules/menu_ui/menu_ui.install
deleted file mode 100644
index a75a02c..0000000
--- a/core/modules/menu_ui/menu_ui.install
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-/**
- * @file
- * Install, update and uninstall functions for the menu_ui module.
- */
-
-/**
- * Implements hook_install().
- */
-function menu_ui_install() {
-  // Rebuild all the menu data.
-  // @todo - remove this when we understand why removing it breaks the
-  // standard install profile, possibly need to be handled in
-  // \Drupal\Core\Extension\ModuleHandler::install().
-  // @see https://drupal.org/node/2181151
-  \Drupal::service('router.builder')->rebuild();
-}
-
-/**
- * Implements hook_uninstall().
- */
-function menu_ui_uninstall() {
-  \Drupal::service('router.builder')->setRebuildNeeded();
-}
diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install
index b5e2b63..99a7f02 100644
--- a/core/profiles/standard/standard.install
+++ b/core/profiles/standard/standard.install
@@ -38,6 +38,11 @@ function standard_install() {
   $user->roles[] = 'administrator';
   $user->save();
 
+  // After
+  // We deal with menu links now, so we have to ensure that the router got
+  // rebuilds.
+  \Drupal::service('router.builder')->rebuildIfNeeded();
+
   // Enable the Contact link in the footer menu.
   /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */
   $menu_link_manager = \Drupal::service('plugin.manager.menu.link');
