Fix nwbuild.sh multi module support

It wasn’t iterating the array correctly