loader: rename vars to avoid shadowing grains() func