src: Fix io_flags_ is unexpectedly cleared