[Serializer] Handle circular references. symfony/symfony#12098.