I think I found a typo in the gridinterplayer document available here:
On page 4 it says that the weight on the lower grid point is
1-(secondlayerindex-1)/n2
but it should be
1-(secondlayerindex-1)/(n2+1)
since secondlayerindex goes from 1 to n2+2. When secondlayerindex = n2+2, you have to put zero mass on the left grid point.