Track more task state that we need to restore on deepforking.