ModeShape/modeshape — pull request #796 by hchiorean (2013-04-19 13:48:51+00:00)
Title: MODE-1900 - Fixed retrieving DISTINCT JOIN results.

The fix is a partial revert of https://issues.jboss.org/browse/MODE-1737: the old code introduced something called ```locationStartIndexInTuple``` and assumed that location indexes in tuples are on consecutive positions, which doesn't seem to be true.

The fix itself changes the code so that selector names are used and for each selector name (in a given tuple), the index of the ```Location``` is retrieved & used.

Both the old tests (introduced as part of MODE-1737) and the new ones (for this scenario) pass.