[PATCH 1/5] mfreadwrite: Add stream index validation for Flush().