fixes incorrect indicies being returned from .dist.2dto1d
Merge pull request #12 from jmarshallnz/master

Fixes incorrect index computation in .dist.2dto1d