transaction_sort: if curdep == curpkg don't do any sorting, it's sorted already.