mongo_collection_aggregate used to accept only a document that includes a "pipeline" array. A pipeline that includes an $out stage looks like:
If the function finds "$out" but there's no explicit writeConcern then it inherits the collection's writeConcern, per spec.
CDRIVER-2606 we also accept a BSON array passed directly, not as an element of the input document. That work was incomplete: if mongoc_collection_aggregate is passed a BSON array directly then it doesn't search the array for "$out" and doesn't inherit writeConcern from its collection object.