I had a problem one time with a flickering Headlight. It was due to a bad ground.

Your instrument lights ground when you snap them in the gauge housing, unless there is some fresh paint causing a bad ground I dont think that would be your problem.

I believe Denny Graham has rebuilt a headlight switch.
Maybe He or someone else will chime in with some helpful troubleshooting tips

Good Luck