improve test coverage - and of course fix a few glitches uncovered by the tests
Merge branch 'improve-test-coverage' into clean-dump-command