Will not be related to the door switch.......
Virtually ALL the 1997 production run was affected (all cars thru 11/18/97) and even some late 1996s. There was a TSB regarding a large batch of improper IM gaskets, failed due to lack of waterproofing.
If this occurs, however, the idle usually does NOT correct itself!
Test: What happens if you turn the A/C on during high-idle? Wait exactly 3 seconds after A/C on, and see if it self-corrects. IF SO, you may not have an IM gasket problem, but a failed Idle Speed Motor ....also called Idle Air Control. It also has a gasket which could be the culprit if not the ISM