CSHARP-797: Handle MaxCommandSize and MaxDocumentSize in more places.