There was nothing changed in the .40 with respect to the script processing.
Maybe you all of a sudden experience a history issue, eg. that certain script-lines are skipped due to violating the history checks?
Have you tried the ‘Test’ function of the script to see, if you see some skips or warnings there?!

The length of a program also doesn’t depend on the number of script-lines, as once all script-lines have been used, the script is looped. So please also che k your script’s LoopLine value.