Range analysis fixes.
Range analysis fixes.

Closes #247.

diku-dk/futhark,diku-dk/futhark,HIPERFIT/futhark,diku-dk/futhark,HIPERFIT/futhark,ihc/futhark,ihc/futhark,diku-dk/futhark,HIPERFIT/futhark,diku-dk/futhark,ihc/futhark