protected function addToScopes(TreeScope $scope)
    {
        $this->scopes[] = $scope;
        $this->scopeByName[$scope->getName()] = $scope;
        $this->scopeByModelRootId[$scope->getModelRootId()] = $scope;
        $this->scopeByPathPrefix[$scope->getPathPrefix()] = $scope;
    }