protected function hasListifyScopeChanged()
    {
        $scope = $this->normalizeListifyScope($this->getScopeName(), true);

        if ($scope instanceof BelongsTo) {
            // for BelongsTo scopes, use a cleaner way to check for differences
            $foreignKey = $scope->getForeignKeyName();
            return (Arr::get($this->getOriginal(), $foreignKey) != $this->getAttribute($foreignKey));
        }

        if (null === $this->stringScopeValue && ! $this->stringScopeNullExplicitlySet) {

            // if the known previous scope is null, make sure this isn't the result of a
            // variable scope that returned null - if that is the case, the scope has changed
            if (null !== $scope && $this->hasVariableListifyScope()) {
                
                $this->swapChangedAttributes();
                $previousScope = $this->normalizeListifyScope($this->getScopeName());
                $this->swapChangedAttributes();
                
                if (null === $previousScope) return true;
            }

            $this->stringScopeValue = $scope;
            $this->stringScopeNullExplicitlySet = (null === $scope);
            return false;
        }

        return ($scope != $this->stringScopeValue);
    }