Make select work correctly with new channel closing semantics