ENG-3900 backport to 4.0.1.x