Bug fix: avoid duplicate txin_id.