I think it should only replace New cards with cards that had been discarded during the player's turn, only one replacement per occurrence in the Discard pile. It will still work as designed with Shelter and be less chaotic at other times. (Also, no playing a bunch of Quick cards, discarding Prosperity, and replacing all the New ones with several Prosperity.)
Alternately, it could be written to only work if last card played was Shelter.