Wrong. The hat was paid for. The seller never owned the $20. He acted as a go-between for the buyer and changer. Technically, the changer should have been out the $20, but since the seller brought it to him, that’s where he went back to get it. All the $20 did was pass through the seller’s hands without any transaction taking place.
Look at it this way. Since the seller only acted as go-between you can consider him irrelevent to the money changing.
Buyer needs change. Gives Fake 20 to changer - get’s Real 10 and Real 5 x 2.
Buyer goes to seller, gives him Real 10 - gets hat. Seller even.
Changer comes back and get Real 20 from seller.
Seller out Real $20.
If you’re still confused, here’s more. What if the money was never discovered to be fake? How much is the seller out then? Nothing.
What if the changer realized it was fake, but either didn’t say anything, or got the money back from the buyer? How much is the seller out? Nothing.
Since the changer got his $20 from the seller, the seller is only out $20.