Need to sort tsort output now as depths are not sorted