private function _runCircularDependencyCheck($resourceId) {
        $this->_unresolved[$resourceId] = $resourceId;
        foreach ($this->_resourceGraph[$resourceId] as $dependency) {
            if (!in_array($dependency, $this->_resolved)) {
                if (in_array($dependency, $this->_unresolved)) {
                    return $this->_getError(2, $resourceId);
                }
                //return recursive error if any
                if ($error = $this->runDependencyCheck($dependency)) {
                    return $error;
                }
            }
        }
        unset($this->_unresolved[$resourceId]);
        $this->_resolved[$resourceId] = $resourceId;
    }