1999 scrambler 4×4 issue

My scrambler has been having an intermittent problem with the 4×4. I seem to loose power to the the awd switch randomly. The other day after some hard riding through some deep muddy water I lost power to the switch. It wasn’t lit up.

I pulled the side of the trail and after some time it started working again. I didn’t have anymore problems the rest of the day even in the same mud hole.

I had this happen the last snow we had. Same symptoms. The light went out and came back on after some time had passed.

I’m in the process of going through the wiring and I can’t find anything wrong. Everything I’ve check with the ohm meter has been fine. Only thing that was an issue was the connection to the hubs were pretty gunked up. I can’t repeat the problem in the garage so it’s hard to track it down. I was wondering if anyone had an idea of what the culprit could be. I don’t want to have to be pulled out by my friends Yamaha again he already won’t let me live it down :aargh4: