BUG: fix sort_index with one col and ascending list

Fixes #4839.

now actually checks the first element of the list