Fix crash bug with duplicate inputs within a transaction
Fix crash bug with duplicate inputs within a transaction

Introduced by #9049

BTCGPU/BTCGPU,guncoin/guncoin,lbryio/lbrycrd,ElementsProject/elements,vmp32k/litecoin,qtumproject/qtum,ahmedbodi/vertcoin,digibyte/digibyte,lbryio/lbrycrd,GroestlCoin/GroestlCoin,digibyte/digibyte,qtumproject/qtum,guncoin/guncoin,vmp32k/litecoin,thrasher-/litecoin,lbryio/lbrycrd,gjhiggins/vcoincore,vertcoin/vertcoin,digibyte/digibyte,guncoin/guncoin,Bushstar/UFO-Project,Bushstar/UFO-Project,gjhiggins/vcoincore,ElementsProject/elements,Bushstar/UFO-Project,guncoin/guncoin,gjhiggins/vcoincore,gjhiggins/vcoincore,h4x3rotab/BTCGPU,vertcoin/vertcoin,BTCGPU/BTCGPU,lbryio/lbrycrd,ahmedbodi/vertcoin,vmp32k/litecoin,vertcoin/vertcoin,h4x3rotab/BTCGPU,h4x3rotab/BTCGPU,GroestlCoin/GroestlCoin,thrasher-/litecoin,guncoin/guncoin,Bushstar/UFO-Project,lbryio/lbrycrd,GroestlCoin/GroestlCoin,qtumproject/qtum,vmp32k/litecoin,h4x3rotab/BTCGPU,lbryio/lbrycrd,h4x3rotab/BTCGPU,vertcoin/vertcoin,GroestlCoin/bitcoin,GroestlCoin/bitcoin,ahmedbodi/vertcoin,qtumproject/qtum,BTCGPU/BTCGPU,thrasher-/litecoin,ahmedbodi/vertcoin,GroestlCoin/GroestlCoin,ElementsProject/elements,digibyte/digibyte,BTCGPU/BTCGPU,GroestlCoin/GroestlCoin,gjhiggins/vcoincore,GroestlCoin/GroestlCoin,ElementsProject/elements,qtumproject/qtum,digibyte/digibyte,lbryio/lbrycrd,GroestlCoin/bitcoin,thrasher-/litecoin,ElementsProject/elements,digibyte/digibyte,BTCGPU/BTCGPU,vertcoin/vertcoin,thrasher-/litecoin,ElementsProject/elements,thrasher-/litecoin,qtumproject/qtum,qtumproject/qtum,ahmedbodi/vertcoin,BTCGPU/BTCGPU,gjhiggins/vcoincore,GroestlCoin/bitcoin,ahmedbodi/vertcoin,vertcoin/vertcoin,vmp32k/litecoin,GroestlCoin/bitcoin,Bushstar/UFO-Project,Bushstar/UFO-Project,vmp32k/litecoin,GroestlCoin/bitcoin,h4x3rotab/BTCGPU,guncoin/guncoin