There's another problem: when a channel is closed, the select case for it will not only be triggered once, but repeatedly in the for loop. So the `closed` counter is incremented multiple times for the same channel, until this has happened often enough that the for loop will exit. So we must either track closedness separately per channel or we ignore proper draining for now and fix it up later.