diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
index 3e94b7d..6e2ab86 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
@@ -1080,32 +1080,12 @@ public function __clone() {
     // objects in their $parent property after the call to setContext().
     $this->clearTranslationCache();
 
-    // Because the new translation objects that are created below are
-    // themselves created by *cloning* the newly cloned entity we need to
-    // make sure that the references to property values are properly cloned
-    // before cloning the fields. Otherwise calling
-    // $items->getEntity()->isNew(), for example, would return the
-    // $enforceIsNew value of the old entity.
-
-    // Ensure the translations array is actually cloned by overwriting the
-    // original reference with one pointing to a copy of the array.
-    $translations = $this->translations;
-    $this->translations = &$translations;
-
-    // Ensure that the following properties are actually cloned by
-    // overwriting the original references with ones pointing to copies of
-    // them: enforceIsNew, newRevision, loadedRevisionId and fields.
-    $enforce_is_new = $this->enforceIsNew;
-    $this->enforceIsNew = &$enforce_is_new;
-
-    $new_revision = $this->newRevision;
-    $this->newRevision = &$new_revision;
-
-    $original_revision_id = $this->loadedRevisionId;
-    $this->loadedRevisionId = &$original_revision_id;
-
-    $fields = $this->fields;
-    $this->fields = &$fields;
+    $properties_to_clone = ['translations', 'enforceIsNew', 'newRevision', 'loadedRevisionId', 'fields'];
+    foreach ($properties_to_clone as $property_name) {
+      $property_value = $this->$property_name;
+      $this->$property_name = &$property_value;
+      unset($property_value);
+    }
 
     foreach ($this->fields as $name => $values) {
       $this->fields[$name] = [];
