Hmm not sure if related but my brother had a similar problem with his side stand switch on his old bike 97bLADE causing very much the same problems you're experiening, had side stand switch replaced twice then wiring loom...was okay for few days.

Turned out to be the rectifier breaking down.