sortedIndex for 2-arg comparator, fixes #2629
test: sortedIndex for 2 arg comparator
Issue #2629 in test