diff --git a/src/Plugin/migrate/process/EntityLookup.php b/src/Plugin/migrate/process/EntityLookup.php
index a3dd2fa1d52a35cc95f56b1a583d552fbb2a3a11..54b2a805ff854a9dceda448c2a379da205101e69 100644
--- a/src/Plugin/migrate/process/EntityLookup.php
+++ b/src/Plugin/migrate/process/EntityLookup.php
@@ -114,7 +114,9 @@ class EntityLookup extends ProcessPluginBase implements ContainerFactoryPluginIn
   public function transform($value, MigrateExecutableInterface $migrateExecutable, Row $row, $destinationProperty) {
     // In case of subfields ('field_reference/target_id'), extract the field
     // name only.
-    $destinationProperty = reset(explode('/', $destinationProperty));    $this->determineLookupProperties($destinationProperty);
+    $parts = explode('/', $destinationProperty);
+    $destinationProperty = reset($parts);
+    $this->determineLookupProperties($destinationProperty);
 
     $this->destinationProperty = isset($this->configuration['destination_field']) ? $this->configuration['destination_field'] : NULL;