ENG-6300 backport to 4.0.1.x