it turned out to be a loose electrical connection on the engine. And it took a long time to track down!
It is surprising how tenuous earth connections can be, it's always worth checking them. My non-starting Guzzi Le Mans eventually turned out to only have an earth via the frayed throttle cable outer where it touched the cylinder head fins.