ENG-6534: backport export fixes.