Issue #21425: Fix flushing of standard streams in the interactive interpreter.