As the index for sub-documents has been removed, we need to use $addToSet to ensure, an object is not added twice. See: https://docs.mongodb.com/manual/reference/operator/update/addToSet/