Fix inner/outer ref bug

Only showed on multinode mapreduce