Same procedure for C and D Mags.
Before removing the switch completely, try loosening the set screw for the switch, re-positioning the switch in the Mag body to make sure it is well-centered, and then re-tightening the set screw. I suspect that sometimes the set screw isn't making good ground contact with the little indent in the Mag body, causing apparent switch problems.
The set screw should bear against the indent seen here:
If the set screw doesn't bear against this indent, then possibly the set screw isn't making good contact with bare metal, but instead is pressing against anodized aluminum, which is not a good ground.
For instructions for removing the switch in new version Mags, see this
link.
For the old version Mags, see these
instructions.
I've unscrewed the retaining ring (12) for the old Mags by using the tips of fine needlenose pliers. Once the ring is loosened, the same 5/64" Allen wrench used to loosen the switch also can be used to unscrew the ring the rest of the way quickly.
One caution. The two halves of the switch for one of my old C Mags were not glued or otherwise well attached. So when I popped the switch out of the Mag body, the two halves flew apart under spring pressure. Fortunately, I found all of the little parts but it took a lot of praying to the carpet god.
So when you slide the switch out of the Mag tube, hold onto the fat barrel part of the switch to make sure it stays together.