Also check the TPS connection. Easy - turn on ignition (don't have to start bike) and roll the throttle whilst looking at LEDs on the PCIII. (ooops… I was thinking PCIII, not PCv sorry)
That being said - check the cutout switch and the sidestand switch as a preliminary troubleshoot. BE CAREFUL on sidestand switch - disconnect and short the wires from the loom.... BE CAREFUL as you run the risk of starting the bike in gear. Any time the sidestand is down the engine will be totally immobilized - sorta like dead. You can be riding along and lower the sidestand and the bike will die (as you describe).
Same method for the cutoff switch (right handlebar switch assy). Checking that is a little more awkward.