Unfortunately, the game can't be loaded ("Internal Error"), so I can't look at what happened.
I could lookup the game's cards in Dombot, so I got a few theories:
1) Was the card you set aside with Prince "Walled Village"?
2) Are you sure that the Walled Village and Prince were returned to your deck?
Walled Village can in some circumstances be returned to your deck:
At the start of Clean-up, if you have this and no more than one other Action card in play, you may put this on top of your deck.
Normally, you are asked if you want to topdeck Walled Village if the conditon is met. Maybe you reflexively agreed to that. But there is also an autoplay that you can set to automatically topdeck the card without you getting asked.
This is what I suspect happened: The Walled Village returned to the deck automatically due to the autoplay, but Prince didn't (that's why I asked the second question). In this case, the autoplay was bad for you, and unfortunately the game doesn't recoginze this and does it anyway.
Of course, if you set aside another card, that theory is moot.