CXX-382 Backport server r2.7.8..r2.7.9 fixes to legacy branch