private function adjustSelfTokens(StreamMetaData $metadata, array $replacedNodes): void
    {
        foreach ($replacedNodes as $replacedNode)
        {
            $position = $replacedNode->getAttribute('startTokenPos');
            $metadata->tokenStream[$position][1] = $replacedNode->toString();
        }
    }