-play Royal Seal, Quarry, Talisman
-buy Mint
-choose Talisman's buy effect
--gain another copy of Mint (it only costs $3 thanks to quarry)
--royal seal is in play, top deck that Mint
-do Mint's buy effect, trashing the treasures
-gain the Mint you bought
Net result: quarry, royal seal, talisman in trash, one mint in discard, one mint on top of the deck.
Net result from Goko's faulty implementation: treasures in trash, one mint on top of the deck.
Talisman gains you the extra copy right when you're resolving it; it doesn't wait for you to gain the card you bought.
Inception Leo is only expecting one mint to be top decked, but he should still be gaining two Mints.
Edit: how Goko does it:
-Play the treasures
-buy mint
-can top-deck mint with royal seal
-treasures trashed
Another edit: tl;dr: you buy a card (and handle when-you-buy events) and then you gain it (and handle when-you-gain events)