Merge change 4708 into donut

* changes:
  Make RestoreHelper and friends also write out the snapshot state.