The fault codes are created during the boot up interval while the MIL is glowing steady after the ignition key is turned on. If the computer detects a faulty switch or wiring connection during this boot up period it stores the error.
Codes represent a circuit malfunction, which includes wiring, connection, switches.... When that circuit breaks, it is considered a fault (irrespective of component responsible for circuit breakdown). During the boot up period the ciruit WAS broken with upside down sensor in my case or it could have been broken wires at that time or any other component.
The current does not flow if there is a missing switch, or broken wire or switch is turned off (as upside down rollover sensor would do by its design). The computer is only detecting flow of current or lack of current. The computer does not know why current does not flow. The computer does not know if the switch is turned off or a wire is disconnected.
When the rollover switch is upside down, the current stops flowing and ECU knows that rollover sensor circuit has some problem and it stops engine in its tracks. So the ECU is behaving the way it is programmed to do.
The codes are there to point the rider in right direction so that he can find out which component caused the circuit breakdown.
Do you want to do a test on your bike and let me know what you see ?