Fixed bug causing txin.txin_id duplicate key error.