[Serializer] Handle circular references