diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php
index 946645d..acb63fb 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php
+++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php
@@ -156,6 +156,14 @@ public function setValue($values, $notify = TRUE) {
       parent::setValue($values, FALSE);
       // Support setting the field item with only one property, but make sure
       // values stay in sync if only property is passed.
+      if (!$notify && isset($values['target_id']) && isset($values['entity']) && $values['target_id'] == static::$NEW_ENTITY_MARKER &&
+      !$values['entity']->isNew()) {
+        // Handle when the entity was saved but the property here was not
+        // updated - this happens when properties are cloned after an entity
+        // has been serialized before EntityReferenceItem::preSave() has run.
+        // @see \Drupal\Core\TypedData\TypedDataManager::getPropertyInstance()
+        $values['target_id'] = $values['entity']->id();
+      }
       if (isset($values['target_id']) && !isset($values['entity'])) {
         $this->onChange('target_id', FALSE);
       }
diff --git a/core/modules/entity_reference/src/Tests/EntityReferenceItemTest.php b/core/modules/entity_reference/src/Tests/EntityReferenceItemTest.php
index 0898f48..f7150d3 100644
--- a/core/modules/entity_reference/src/Tests/EntityReferenceItemTest.php
+++ b/core/modules/entity_reference/src/Tests/EntityReferenceItemTest.php
@@ -208,6 +208,12 @@ public function testEntitySaveOrder() {
     $entity->name->value = $this->randomMachineName();
     // Now save the term.
     $term->save();
+    // Now serialize it.
+    $entity = serialize($entity);
+    // And unserialize it.
+    $entity = unserialize($entity);
+    // Now attempt to get the entity value.
+    $entity->get('field_test_taxonomy_term')->entity;
     // And then the entity.
     $entity->save();
     $this->assertEqual($entity->field_test_taxonomy_term->entity->id(), $term->id());
