Fixes for stream simplification.
Fixes for stream simplification.

mrakgr/futhark,ihc/futhark,CulpaBS/wbBach,mrakgr/futhark,HIPERFIT/futhark,ihc/futhark,diku-dk/futhark,diku-dk/futhark,diku-dk/futhark,diku-dk/futhark,mrakgr/futhark,HIPERFIT/futhark,ihc/futhark,diku-dk/futhark,HIPERFIT/futhark