the computer never skips any code, but I can think of several other options what happens.
1) have you completely configured all your plugins?
a lot of plugins use switches and variables to allow the developer to control them, and to report their solutions.
And 99% of all new users think they can ignore the plugin configuration that they don't understand, which often results in a plugin gaining control of switches and variables that they use elsewhere.
Whenever you add a plugin, you have to configure it completely. Part of that is checking if any switch or variable used by the plugin is indeed still free to use. If it is already used, you configure the plugin to use a different variable - and in both cases you'll name the variable used in the editor to prevent yourself from using it later for something else.
As for the variable problem: The only way it would be skipped is by having a typo or so in the script.
I strongly suggest you replace that command with two control variable commands using regular options without script and then test again.
also, I suggest adding a show text before the control switch command that shows the content of all variables used - at the moment you cannot determine if the calculation doesn't happen at that time, if the calculation has different numbers than you imagine or if the calculation is correct but the variable is overwritten at a later moment by a different command or plugin.