I'm still not convinced it's a moisture problem. Common causes for that code are:
- Faulty mass air flow sensor
- Intake air leaks
- Dirty mass air flow sensor
- Dirty mass air filter
- Mass air flow sensor harness is open or shorted
- Mass air flow sensor circuit poor electrical connection
The bad idle leads me to believe you have some other MAF-related issue.
Is the intake intact and secure, from the airbox to the throttle body? No openings, holes, or tears?
Is the air filter new? Check it and make sure there's not something in the airbox (saw a car at the dealer with a SNAKE in the airbox, no crap).
Have you cleaned the MAF sensor? Get the MAF cleaner from your local parts store, follow the instructions.
Check the MAF plug - Unplug it with the engine idling, wait, then plug it in again. Does the idle change? Make sure there are no strained or damaged wires.
I know this is all tedious, but that's how we isolate the issue and get you back on the road.