StdoutCapture: Fix issue with modules calling sys.stdout.flush().