Although rugs do pong a bit when cleaned I think that the problem that you have is more severe than that ?
I have had it happen a couple of times and it can really stink a house out !
Not sure why, but it smelled like cat pee, although custys did not have pets.
I think that it was something to do with a cleaning solution that the custy used themselves ? Ammonia smell ? Reactivated when we apply water to the rug ?
Each of the rugs defiantly had soap residue in them from DIY type solutions.
It will go once rug is 100% dry ( not just touch dry )
Count yourself lucky, I always clean rugs at the customers home
Chris