protected function getCopyOID(ObjectId $origOID) {
    $registry = $this->getLocalSessionValue(self::OBJECT_MAP_VAR);

    // check if the oid exists in the registry
    $oidStr = $origOID->__toString();
    if (!isset($registry[$oidStr])) {
      $logger = $this->getLogger();
      if ($logger->isDebugEnabled()) {
        $logger->debug("Copy of ".$oidStr." not found.");
      }
      return null;
    }

    $copyOID = ObjectId::parse($registry[$oidStr]);
    return $copyOID;
  }