Oh wow, lexsort indeed does this. I spent more time than I'd like to admit figuring out a simple way to do that sort. 

(╯°□°）╯︵ ┻━┻

However I think it is needed to give the correct order of the elements in the result for CSC's boolean indexing since it is transposed/converted to CSR to do the operation.