What a dimmer switch is unless you mean hi low beam. If yours is like my 600 that is a switch on the left. Your setup sounds different... Hence your hot lead may be wired different or all together. Need to see your aftermarket schematic.
Either way if yu unplugged it and it runs, what does that tell you? Could mean you have a short there, yes? Connect one end of your taped up leads to a multimeter, the other to the handlebar. (ground) check it on ohms and see if there's continuity. Then check the other lead, and check them both while using the switch. If irrespective of the use of the switch you have continuity you found your short. If that switch side is what hit when you went down be a good bet. Sounds like your positive source for the solenoid is grounding or shorting out, causing your fuse to blow. If this same hot lead is sent to your "dimmer" or is on some common bus you are on track. Generally a hot lead (positive) is supplied to the hi low switch which gets sent to either high or low. 2 position switchCan't tell without seeing it and you have an aftermarket setup. Not solving this isn't helping by keeping the lead out.
Generally stock xr's are damn reliable provided you keep oil in them and do minimal maintenance. Good luck.