I don't know why this was done previously but this just creates a race condition, with no to me apparent benefit.
Probably because I in general didn't consider the case where a stream could be re-enabled mid-flush. Or, alternatively, I assumed without checking that a reconfigure would trigger a new segment (which seems to be generally not the case).
I assume that's the race that's being fixed here, although the commit messages don't specify.