The wiring diagram from WayneC's web site shows the engine starting safety interlock system. Essentially, engine starting is prevented in two separate ways: via the BMW relay or via the starter relay.
1. This will activate (and provide power to fuel pump, ignition, etc) if the sidestand is up.
2. If the sidestand is down, it will only activate if the engine is in neutral.
1. With the starter button pressed, the starter relay will activate (and power starter motor) if the clutch is pulled in.
2. With the starter button pressed, the starter relay will activate if the engine is in neutral.
So, as Buzz says, the only reason for the engine not turning over on the starter when in gear is if the clutch switch is not functioning. I personally, instinctively, always pull the clutch in when I have to restart a bike in gear (eg when the engine has stalled) and so don't need the clutch switch safety device. If its contacts at the cable connector are shorted out then this will remove this safety feature - or you could replace the switch with a new one as this is likely to be the fault.
2006 F650GS in Black