Fixed sorting of LocalCorr ouptus

More general solution by reverse indexing keys