Fix off-by-one errors in use of IsFinalTx()