I decided my explanation wasn't very clear - so here's an edited version:
So I was playing online the other day and played a replace with a trader in my hand. I trashed a copper to gain an estate, then used trader to gain a silver instead. My opponent still got a curse (though they trashed it with watchtower so it made very little actual difference to the game) and I can't remember if the silver was topdecked.
According to my interpretation of the famous "Blue Dog Rule" (and my interpretation is probably what's at fault here), this is wrong.
AFAIK, the BDR was formulated for Ironworks/Trader, and the upshot there is that, if you gain, say, and action, with Ironworks but use Trader to switch it to a silver, then you get neither +1 action nor +$1, because the Ironworks didn't actually gain you anything, instead Trader gained you silver. So, my reasoning for Replace is the same: Replace tried to gain me an Estate (thus triggering a cursing) but failed, and Trader gained me a silver instead, so Replace failed to gain an estate and shouldn't curse, just like Ironworks would fail to gain, say, a Menagerie, and thus shouldn't give +1 action in the same situation. Since it was Trader, not Replace, that gained me that silver, then it shouldn't even go on top of my deck, just like if I wouldn't get +$1 if this happened with Ironworks/Trader.
But the coding on ShuffleIT clearly disagrees with me here, so can somebody tell me why?