My G5 also started sputtering a bit the other day. Back home in the garage it went completely dead - no engine light, nothing. Then I found that when I turned the handlebars all the way to the right, the ignition came on! Took off the headlight and found one of the plastic clip-on connectors had come unclipped, so was only making contact intermittently. Clicked it back together and all is well.
Well worth checking in there - it's like an explosion in a spaghetti factory. I've never seen wiring like it. Ever. Except behind my computer!
Arizoni's right - it's WELL worth checking all the wiring and connectors, and protecting from chafing against metal edges.