[collections] Add shouldAppendObjectClassToReuseIdentifier to the factory.