Patches 1 & 2 provide *most* of the fix required for
https://bugzilla.redhat.com/show_bug.cgi?id=667756
Note that restoring from a gzip'ed image also suffers the same problem, and requires
the same remedy.
Patch 3 remedies a hang during failure that I encountered while
debugging the main problem.