So then I came to the conclusion that the wiring must be going into the unit under the headlight. I then got to work getting the headlight out to look further. After an hour or so and a couple of broken clips, I got the car to this stage

Once I had the light out, I realised I'd removed this connector to gain access to the bulbs

This is the connector supplying power to the lights and all I'd needed to do after changing the bulb is to plug it back in!!

So now I have put the car back together and will buy some clips to replace the broken ones Monday, and also a touch up pen where I'd slightly chipped the paint to lever off the panel under the lights.
The moral, don't change headlight bulbs with a hangover.