My daughter and I have been playing this game, and disagree on what happens if riots occur and you can’t pay. Yes, you have to put a card back under the stack. BUT, can the person who returned the card immediately pay to exchange a card and look through the stack and get that card back (assuming the riots occurred on their turn)?
If you discard a card at the start of your turn, you can pick it back up at the end of your turn.
There's nothing that would prevent this from happening. As the last part of your turn, you are allowed to exchange one card from your hand, and you may pay to look through a draw stack and pick any card you want. The game doesn't place any restrictions on what card you can take, nor does it have any "memory" about where the card has been in the past. You can even do this to pick up the card that the other player discarded. Note that this can't happen "immediately" as you suggest, since you don't exchange cards until the end of the turn, so Riots will take your unit out of commission for at least one round. But it's perfectly legal to discard a unit due to Riots at the start of the turn, pick it back up at the end of the turn, and then play it again on the following turn.
Also note that with expansions, there are non-unique units, so it'd be pretty impractical to disallow a player from picking up the same unit they just discarded - after the fact, it would be impossible to prove if you exchanged for the Chief Cannoneer on the bottom that you just discarded, or the one that's second from the bottom that you didn't discard.