Fixes to irregular memory expansion.
Fixes to irregular memory expansion.

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