CXX-381 Backport server r2.6.5..r2.6.6 changes to 26compat branch