stream: fix small nit in select hack, add test