Yes, this can be a problem indeed. We may do more complex check based on spl_object_hash later. But this can introduce some more problem and strange extraction (imagine user A that is extracted, user A contains a tweet, and a tweet contains two users that retweeted, one of them being the user A itself and user B. If we do the check bsed on spl_object_hash, user A won't be serialized while user B will. With only checking the class, none of them will be serialized which is more logical).