Set up the mapdb persistence file per the Persistence wiki page and everything is done for you. Just be sure to use “restoreOnStartup” and “everyChange” strategy and only list your startup switch in the mapdb.persist file.
In your rule all you need to do is startingSwitch.sendCommand(OFF) where startingSwitch is the one that the other rules check to determine whether they are allowed to run.
Also, if the rules you are having problems with are not associated with your GPIO problems, you can add the important Items that are causing your problems to the persistence and their last value will be reloaded before your rules execute and you will avoid the Undef errors.
You have the flexibility to finely tune all of this to your needs.