Why does this attempt to switch the emitting dispatcher throw an IllegalStateException at runtime?
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.*
fun broken(): Flow<Int> = flow {
withContext(Dispatchers.IO) {
emit(1)
}
}