CSHARP-1013: Fixed code analysis warnings (except one still to be analyzed).