Test and fix for issue #143 - parse logging adds a StreamHandler before setup_capture() is called