diff --git a/core/includes/common.inc b/core/includes/common.inc
index 53e0be5c91..de03d1a533 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -608,7 +608,7 @@ function drupal_process_states(&$elements) {
  *     'id' => 'my-module-table',
  *   ),
  * );
- * return drupal_render($table);
+ * return \Drupal::service('renderer')->render($table);
  * @endcode
  *
  * In the theme function for the form, a special class must be added to each
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
index 4e00f27b20..ff59d92a1a 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
@@ -772,11 +772,11 @@ protected function updateFieldLangcodes($langcode) {
    * {@inheritdoc}
    */
   public function onChange($name) {
-    // Check if the changed name is the value of an entity key and if the value
-    // of that is currently cached, if so, reset it. Exclude the bundle from
-    // that check, as it ready only and must not change, unsetting it could
+    // Check if the changed name is the value of any entity keys and if any of
+    // those values are currently cached, if so, reset it. Exclude the bundle
+    // from that check, as it ready only and must not change, unsetting it could
     // lead to recursions.
-    if ($key = array_search($name, $this->getEntityType()->getKeys())) {
+    foreach (array_keys($this->getEntityType()->getKeys(), $name, TRUE) as $key) {
       if ($key != 'bundle') {
         if (isset($this->entityKeys[$key])) {
           unset($this->entityKeys[$key]);
diff --git a/core/lib/Drupal/Core/Entity/entity.api.php b/core/lib/Drupal/Core/Entity/entity.api.php
index 2b893fd7b3..085dc3c433 100644
--- a/core/lib/Drupal/Core/Entity/entity.api.php
+++ b/core/lib/Drupal/Core/Entity/entity.api.php
@@ -590,7 +590,7 @@
  * // rules will be used.
  * $build = $view_builder->view($entity, 'view_mode_name', $language->getId());
  * // $build is a render array.
- * $rendered = drupal_render($build);
+ * $rendered = \Drupal::service('renderer')->render($build);
  * @endcode
  *
  * @section sec_access Access checking on entities
diff --git a/core/lib/Drupal/Core/Menu/menu.api.php b/core/lib/Drupal/Core/Menu/menu.api.php
index 5cfacec4c2..9581efd916 100644
--- a/core/lib/Drupal/Core/Menu/menu.api.php
+++ b/core/lib/Drupal/Core/Menu/menu.api.php
@@ -201,7 +201,7 @@
  * // Finally, build a renderable array from the transformed tree.
  * $menu = $menu_tree->build($tree);
  *
- * $menu_html = drupal_render($menu);
+ * $menu_html = \Drupal::service('renderer')->render($menu);
  * @endcode
  *
  * @}
diff --git a/core/modules/config/src/Form/ConfigSync.php b/core/modules/config/src/Form/ConfigSync.php
index 281309922a..f71d6d5a46 100644
--- a/core/modules/config/src/Form/ConfigSync.php
+++ b/core/modules/config/src/Form/ConfigSync.php
@@ -342,7 +342,6 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
           'init_message' => t('Starting configuration synchronization.'),
           'progress_message' => t('Completed step @current of @total.'),
           'error_message' => t('Configuration synchronization has encountered an error.'),
-          'file' => __DIR__ . '/../../config.admin.inc',
         ];
         foreach ($sync_steps as $sync_step) {
           $batch['operations'][] = [[get_class($this), 'processBatch'], [$config_importer, $sync_step]];
diff --git a/core/modules/image/src/Controller/ImageStyleDownloadController.php b/core/modules/image/src/Controller/ImageStyleDownloadController.php
index afc1edf75d..3d4ee1cc81 100644
--- a/core/modules/image/src/Controller/ImageStyleDownloadController.php
+++ b/core/modules/image/src/Controller/ImageStyleDownloadController.php
@@ -11,6 +11,7 @@
 use Symfony\Component\HttpFoundation\BinaryFileResponse;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
 use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
 
@@ -79,6 +80,8 @@ public static function create(ContainerInterface $container) {
    * @return \Symfony\Component\HttpFoundation\BinaryFileResponse|\Symfony\Component\HttpFoundation\Response
    *   The transferred file as response or some error response.
    *
+   * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
+   *   Thrown when the file request is invalid.
    * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
    *   Thrown when the user does not have access to the file.
    * @throws \Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException
@@ -104,7 +107,11 @@ public function deliver(Request $request, $scheme, ImageStyleInterface $image_st
       $valid &= $request->query->get(IMAGE_DERIVATIVE_TOKEN) === $image_style->getPathToken($image_uri);
     }
     if (!$valid) {
-      throw new AccessDeniedHttpException();
+      // Return a 404 (Page Not Found) rather than a 403 (Access Denied) as the
+      // image token is for DDoS protection rather than access checking. 404s
+      // are more likely to be cached (e.g. at a proxy) which enhances
+      // protection from DDoS.
+      throw new NotFoundHttpException();
     }
 
     $derivative_uri = $image_style->buildUri($image_uri);
diff --git a/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php b/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php
index a0c7b19359..c5b81e7ce3 100644
--- a/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php
+++ b/core/modules/image/tests/src/Functional/ImageStylesPathAndUrlTest.php
@@ -176,10 +176,10 @@ public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_s
     }
     // Add some extra chars to the token.
     $this->drupalGet(str_replace(IMAGE_DERIVATIVE_TOKEN . '=', IMAGE_DERIVATIVE_TOKEN . '=Zo', $generate_url));
-    $this->assertResponse(403, 'Image was inaccessible at the URL with an invalid token.');
+    $this->assertResponse(404, 'Image was inaccessible at the URL with an invalid token.');
     // Change the parameter name so the token is missing.
     $this->drupalGet(str_replace(IMAGE_DERIVATIVE_TOKEN . '=', 'wrongparam=', $generate_url));
-    $this->assertResponse(403, 'Image was inaccessible at the URL with a missing token.');
+    $this->assertResponse(404, 'Image was inaccessible at the URL with a missing token.');
 
     // Check that the generated URL is the same when we pass in a relative path
     // rather than a URI. We need to temporarily switch the default scheme to
@@ -299,13 +299,13 @@ public function doImageStyleUrlAndPathTests($scheme, $clean_url = TRUE, $extra_s
     $this->assertTrue($matches_expected_url_format, "URL for a derivative of an image style matches expected format.");
     $nested_url_with_wrong_token = str_replace(IMAGE_DERIVATIVE_TOKEN . '=', 'wrongparam=', $nested_url);
     $this->drupalGet($nested_url_with_wrong_token);
-    $this->assertResponse(403, 'Image generated from an earlier derivative was inaccessible at the URL with a missing token.');
+    $this->assertResponse(404, 'Image generated from an earlier derivative was inaccessible at the URL with a missing token.');
     // Check that this restriction cannot be bypassed by adding extra slashes
     // to the URL.
     $this->drupalGet(substr_replace($nested_url_with_wrong_token, '//styles/', strrpos($nested_url_with_wrong_token, '/styles/'), strlen('/styles/')));
-    $this->assertResponse(403, 'Image generated from an earlier derivative was inaccessible at the URL with a missing token, even with an extra forward slash in the URL.');
+    $this->assertResponse(404, 'Image generated from an earlier derivative was inaccessible at the URL with a missing token, even with an extra forward slash in the URL.');
     $this->drupalGet(substr_replace($nested_url_with_wrong_token, '////styles/', strrpos($nested_url_with_wrong_token, '/styles/'), strlen('/styles/')));
-    $this->assertResponse(403, 'Image generated from an earlier derivative was inaccessible at the URL with a missing token, even with multiple forward slashes in the URL.');
+    $this->assertResponse(404, 'Image generated from an earlier derivative was inaccessible at the URL with a missing token, even with multiple forward slashes in the URL.');
     // Make sure the image can still be generated if a correct token is used.
     $this->drupalGet($nested_url);
     $this->assertResponse(200, 'Image was accessible when a correct token was provided in the URL.');
diff --git a/core/modules/layout_builder/layout_builder.module b/core/modules/layout_builder/layout_builder.module
index 2138a045f3..9818158590 100644
--- a/core/modules/layout_builder/layout_builder.module
+++ b/core/modules/layout_builder/layout_builder.module
@@ -81,3 +81,17 @@ function layout_builder_field_config_delete(FieldConfigInterface $field_config)
   $sample_entity_generator->delete($field_config->getTargetEntityTypeId(), $field_config->getTargetBundle());
   \Drupal::service('plugin.manager.block')->clearCachedDefinitions();
 }
+
+/**
+ * Implements hook_plugin_filter_TYPE_alter().
+ */
+function layout_builder_plugin_filter_block_alter(array &$definitions, array $extra, $consumer) {
+  if ($consumer !== 'layout_builder') {
+    // Inline blocks should only be exposed in the Layout Builder.
+    foreach (array_keys($definitions) as $key) {
+      if ($definitions[$key]['id'] === 'inline_block_content') {
+        unset($definitions[$key]);
+      }
+    }
+  }
+}
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module
index 8b4f2ba827..d7dc635146 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.module
+++ b/core/modules/system/tests/modules/entity_test/entity_test.module
@@ -101,6 +101,9 @@ function entity_test_entity_type_alter(array &$entity_types) {
   if (!$state->get('entity_test_new')) {
     unset($entity_types['entity_test_new']);
   }
+
+  $entity_test_definition = $entity_types['entity_test'];
+  $entity_test_definition->set('entity_keys', $state->get('entity_test.entity_keys', []) + $entity_test_definition->getKeys());
 }
 
 /**
diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php
index 9f8c5b0521..771d81a9ad 100644
--- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php
+++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php
@@ -109,7 +109,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
         ],
       ]);
 
-    return $fields;
+    return $fields + \Drupal::state()->get($entity_type->id() . '.additional_base_field_definitions', []);
   }
 
   /**
@@ -164,4 +164,15 @@ public function getName() {
     return $this->get('name')->value;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getEntityKey($key) {
+    // Typically this protected method is used internally by entity classes and
+    // exposed publicly through more specific getter methods. So that test cases
+    // are able to set and access entity keys dynamically, update the visibility
+    // of this method to public.
+    return parent::getEntityKey($key);
+  }
+
 }
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php
new file mode 100644
index 0000000000..834f04cc27
--- /dev/null
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php
@@ -0,0 +1,56 @@
+<?php
+
+namespace Drupal\KernelTests\Core\Entity;
+
+use Drupal\Core\Field\BaseFieldDefinition;
+use Drupal\entity_test\Entity\EntityTest;
+
+/**
+ * Test the behavior of entity keys.
+ *
+ * @group entity
+ */
+class EntityKeysTest extends EntityKernelTestBase {
+
+  /**
+   * Test the cache when multiple keys reference a single field.
+   *
+   * @dataProvider multipleKeysCacheTestCases
+   */
+  public function testMultipleKeysCache($translatable) {
+    $this->state->set('entity_test.additional_base_field_definitions', [
+      'test_field' => BaseFieldDefinition::create('string')->setTranslatable($translatable),
+    ]);
+    $this->state->set('entity_test.entity_keys', [
+      'key_1' => 'test_field',
+      'key_2' => 'test_field',
+    ]);
+    drupal_flush_all_caches();
+    $this->installEntitySchema('entity_test');
+
+    $entity = EntityTest::create([]);
+
+    $entity->set('test_field', 'foo');
+    $this->assertEquals('foo', $entity->getEntityKey('key_1'));
+    $this->assertEquals('foo', $entity->getEntityKey('key_2'));
+
+    $entity->set('test_field', 'bar');
+    $this->assertEquals('bar', $entity->getEntityKey('key_1'));
+    $this->assertEquals('bar', $entity->getEntityKey('key_2'));
+  }
+
+  /**
+   * Data provider for ::testMultipleKeysCache.
+   */
+  public function multipleKeysCacheTestCases() {
+    return [
+      'translatable Entity Key' => [
+        TRUE,
+      ],
+      'Non-translatable entity key' => [
+        FALSE,
+      ],
+    ];
+  }
+
+}
