diff --git a/Classes/Indexer/NodeIndexer.php b/Classes/Indexer/NodeIndexer.php
index <HASH>..<HASH> 100644
--- a/Classes/Indexer/NodeIndexer.php
+++ b/Classes/Indexer/NodeIndexer.php
@@ -237,8 +237,6 @@ class NodeIndexer extends AbstractNodeIndexer implements BulkNodeIndexerInterfac
         }
 
         $indexer = function (NodeInterface $node, $targetWorkspaceName = null) {
-            $contextPath = $node->getContextPath();
-
             if ($this->settings['indexAllWorkspaces'] === false) {
                 // we are only supposed to index the live workspace.
                 // We need to check the workspace at two occasions; checking the
@@ -252,10 +250,6 @@ class NodeIndexer extends AbstractNodeIndexer implements BulkNodeIndexerInterfac
                 }
             }
 
-            if ($targetWorkspaceName !== null) {
-                $contextPath = (string)(new TargetContextPath($node, (string)$targetWorkspaceName, $contextPath));
-            }
-
             $documentIdentifier = $this->calculateDocumentIdentifier($node, $targetWorkspaceName);
             $nodeType = $node->getNodeType();
TASK: Remove context path calculation which is moved to calculateDocumentIdentifier