Avoid copying undo data
Merge pull request #4835

ab15b2e Avoid copying undo data (Pieter Wuille)
Merge remote-tracking branch 'upstream/master' into msvc_impairment