Internalise local declarations correctly.
Internalise local declarations correctly.

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