public function findReferenced()
    {
        $liveRecord = $this->getObjectInStage(Versioned::LIVE);

        // For unversioned objects, simply return all owned objects
        if (!$this->isVersioned()) {
            return $liveRecord->findOwned();
        }

        // If we have deleted this record, recursively delete live objects on publish
        if ($this->getChangeType() === ChangeSetItem::CHANGE_DELETED) {
            if (!$liveRecord) {
                return ArrayList::create();
            }
            return $liveRecord->findCascadeDeletes(true);
        }

        // If changed on stage, include all owned objects for publish
        /** @var DataObject|RecursivePublishable $draftRecord */
        $draftRecord = $this->getObjectInStage(Versioned::DRAFT);
        if (!$draftRecord) {
            return ArrayList::create();
        }
        $references = $draftRecord->findOwned();

        // When publishing, use cascade_deletes to partially unpublished sets
        if ($liveRecord) {
            foreach ($liveRecord->findCascadeDeletes(true) as $next) {
                /** @var Versioned|DataObject $next */
                if ($next->hasExtension(Versioned::class) && $next->hasStages() && $next->isOnLiveOnly()) {
                    $this->mergeRelatedObject($references, ArrayList::create(), $next);
                }
            }
        }
        return $references;
    }