Similar thing happened to me after wiring in the Gps to the rear socket. When I stopped the bike and switched off the ignition about 15-20 seconds later the headlamp flashed very quickly and there was a sound of a relay cutting in also. when I pulled out the plug it stopped. This happened about 3-4 times and since then it seems to behave itself. I have no idea why this happened and was going to mention it to the dealer when I took it in for service, but as it did not occour again I left it.
Perhaps the bike was learning that the socket was there as it would have been the first thing that had been connected to it. Who knows, gremlins ? At least they have gone now OR HAVE THEY
Well it's till doing it but doesn't seem to be causing any problems so I'll just mention it on the next service, thought it was some sort of visual confirmation the socket is powering down if you were running anything off it.