Your friend Alice gives you two $10 bills. One is good, one is bad. You take both to buy a $20 T-shirt. Now what?
You set up a JoinMarket to automate the process, then profit.

Use the two $10 bills where both shows up as good ones. I mean not all jurisdictions will use the same regulation.