This fixes bugs where balances were shown incorrectly because the input would be processed after the transaction spending the input if the transactions were in the same block and sorted incorrectly.
Coverage remained the same at 30.618% when pulling 9c410a6f4ea9476efe09fc8935a5c242f3882f60 on sort-transactions-by-index into b3e476a5ebc1c5499880a55c77f06467491ce635 on master.
This fixes bugs where balances were shown incorrectly because the input would be processed after the transaction spending the input if the transactions were in the same block and sorted incorrectly.