SERVER-9808 Fix issues found in CoN static analysis