Fix and improvements to the undo dump code.
Fix and improvements to the undo dump code.

mangalam-research/wed,mangalam-research/wed,lddubeau/wed,lddubeau/wed,lddubeau/wed,mangalam-research/wed,slattery/wed,lddubeau/wed,slattery/wed,mangalam-research/wed,slattery/wed