diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index a7da8d0..b3f4e30 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2938,6 +2938,14 @@ function template_preprocess_maintenance_page(&$variables) {
     }
   }
 
+  // While this code is used in the installer, the language module may not be
+  // enabled yet (even maybe no database set up yet), but an RTL language
+  // selected should result in RTL stylesheets loaded properly already.
+  $variables['css'] = $css = drupal_add_css();
+  include_once DRUPAL_ROOT . '/core/modules/language/language.module';
+  $variables['styles'] = drupal_get_css($css);
+
+  $variables['head']              = drupal_get_html_head();
   $variables['head_title_array']  = $head_title;
   $variables['head_title']        = implode(' | ', $head_title);
   $variables['base_path']         = base_path();
@@ -2950,6 +2958,7 @@ function template_preprocess_maintenance_page(&$variables) {
   $variables['logo']              = theme_get_setting('logo.url');
   $variables['messages']          = $variables['show_messages'] ? theme('status_messages') : '';
   $variables['main_menu']         = array();
+  $variables['scripts'] = drupal_get_js();
   $variables['secondary_menu']    = array();
   $variables['site_name']         = (theme_get_setting('features.name') ? check_plain($site_name) : '');
   $variables['site_slogan']       = (theme_get_setting('features.slogan') ? filter_xss_admin($site_slogan) : '');
@@ -2981,28 +2990,6 @@ function template_preprocess_maintenance_page(&$variables) {
 }
 
 /**
- * Theme process function for theme_maintenance_field().
- *
- * The variables array generated here is a mirror of template_process_html().
- * This processor will run its course when theme_maintenance_page() is invoked.
- *
- * @see maintenance-page.html.twig
- * @see template_process_html()
- */
-function template_process_maintenance_page(&$variables) {
-  $variables['head'] = drupal_get_html_head();
-
-  // While this code is used in the installer, the language module may not be
-  // enabled yet (even maybe no database set up yet), but an RTL language
-  // selected should result in RTL stylesheets loaded properly already.
-  $variables['css'] = $css = drupal_add_css();
-  include_once DRUPAL_ROOT . '/core/modules/language/language.module';
-  $variables['styles'] = drupal_get_css($css);
-
-  $variables['scripts'] = drupal_get_js();
-}
-
-/**
  * Prepares variables for install page templates.
  *
  * Default template: install-page.html.twig.
