Grounding kits often cause electrical problems. I don't understand why, but we always had problems with them at Circuit City when cars came into the bay with them installed. I understand electrical flow, and that's why I don't know why they cause problems so often, but I've found that you don't really need more than a simple upgrade of the stock wiring system even for the best of electrical upgrades (i.e. stereo, lights, etc.). I would take all the grounding stuff off and start fresh with a simple setup again. It's just electrons traveling through metal at the speed of light. After removing the "40 wires" and stepping back to 3-4 good size ones, I would clean the battery terminals and coat them in dielectric grease before I reattached them. That's where I would start. It'll take you a total of maybe an hour to get it done, and your flow will be sufficient that if you need to further continue diagnosis, you know it's working properly. Then I'd trace the headlight circuit, as you know it's happening there. The clicking is the sound of the relay, and for some reason it sounds like your ground (it doesn't actually ground until AFTER the switch) between the relay and the switch is possibly shorted. The circuit will go like:
Constant power (usually a yellow wire, but I don't remember with Subies) to the fusebox, then from the fuse box to the lights, then out to the headlight relay, and back to the steering column into the wand, then chassis grounded to complete the circuit.
Does the car have HIDs installed? Also, because it's happening with the turn signal and on gear shifts, even though not likely, is the wand loose? That's why I would get rid of the majority of the grounding kit and start diagnosing AFTER that. I'd do grounding, battery terminal cleaning and grease, then check the relay, followed by circuit trace, and then the wand, unless the wand is actually loose first.
Hope that helps. Good luck.