diff -u b/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
--- b/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -457,7 +457,9 @@
    */
   protected function registerModuleNamespaces($moduleFileNames) {
     foreach ($moduleFileNames as $module => $filename) {
-      $this->classLoader->registerNamespace("Drupal\\$module", DRUPAL_ROOT . '/' . dirname($filename) . '/lib');
+      $path = DRUPAL_ROOT . '/' . dirname($filename) . '/lib';
+      $this->classLoader->registerNamespace("Drupal\\$module", $path);
+      $this->classLoader->registerPrefix($module, $path);
     }
   }
 }
reverted:
--- b/core/modules/translation_entity/translation_entity.module
+++ a/core/modules/translation_entity/translation_entity.module
@@ -868,7 +868,7 @@
 function translation_entity_field_attach_presave(EntityInterface $entity) {
   if (translation_entity_enabled($entity->entityType(), $entity->bundle())) {
     $attributes = drupal_container()->get('request')->attributes;
+    drupal_container()->get('translation_entity.synchronizer')->synchronizeFields($entity, $attributes->get('working_langcode'), $attributes->get('source_langcode'));
-    Drupal::service('translation_entity.synchronizer')->synchronizeFields($entity, $attributes->get('working_langcode'), $attributes->get('source_langcode'));
   }
 }
 
only in patch2:
unchanged:
--- a/core/modules/overlay/overlay.module
+++ b/core/modules/overlay/overlay.module
@@ -99,7 +99,7 @@ function overlay_field_extra_fields() {
 function overlay_form_user_profile_form_alter(&$form, &$form_state) {
   $account = $form_state['controller']->getEntity($form_state);
   if (user_access('access overlay', $account)) {
-    $account_data = drupal_container()->get('user.data')->get('overlay', $account->id(), 'enabled');
+    $account_data = user::userData()->get('overlay', $account->id(), 'enabled');
     $form['overlay_control'] = array(
       '#type' => 'details',
       '#title' => t('Administrative overlay'),
@@ -119,7 +119,7 @@ function overlay_form_user_profile_form_alter(&$form, &$form_state) {
  */
 function overlay_user_update($account) {
   if (isset($account->overlay)) {
-    drupal_container()->get('user.data')->set('overlay', $account->id(), 'enabled', (int) $account->overlay);
+    user::userData()->set('overlay', $account->id(), 'enabled', (int) $account->overlay);
   }
 }
 
@@ -138,7 +138,7 @@ function overlay_init() {
 
   // Only act if the user has access to the overlay and a mode was not already
   // set. Other modules can also enable the overlay directly for other uses.
-  $user_data = drupal_container()->get('user.data')->get('overlay', $user->uid, 'enabled');
+  $user_data = user::userData()->get('overlay', $user->uid, 'enabled');
   $use_overlay = !isset($user_data) || $user_data;
   if (empty($mode) && user_access('access overlay') && $use_overlay) {
     $current_path = current_path();
@@ -365,7 +365,7 @@ function overlay_user_dismiss_message() {
     throw new AccessDeniedHttpException();
   }
 
-  drupal_container()->get('user.data')->set('overlay', $user->uid, 'message_dismissed', 1);
+  user::userData()->set('overlay', $user->uid, 'message_dismissed', 1);
   drupal_set_message(t('The message has been dismissed. You can change your overlay settings at any time by visiting your profile page.'));
   // Destination is normally given. Go to the user profile as a fallback.
   drupal_goto('user/' . $user->uid . '/edit');
@@ -392,7 +392,7 @@ function overlay_disable_message() {
     return $build;
   }
 
-  $user_data = drupal_container()->get('user.data')->get('overlay', $user->uid);
+  $user_data = user::userData()->get('overlay', $user->uid);
   if (empty($user_data['message_dismissed']) && (!isset($user_data['enabled']) || $user_data['enabled'])) {
     $build = array(
       '#theme' => 'overlay_disable_message',
only in patch2:
unchanged:
--- /dev/null
+++ b/core/modules/user/lib/user.php
@@ -0,0 +1,7 @@
+<?php
+
+class user {
+  public static function userData() {
+    return Drupal::service('user.data');
+  }
+}
