Strange error - undefined point

So I’m getting a compile error when trying to run a program & script that has been working for a few years now, with no known changes.
The error message is that GageHomeInternal is not defined.

Here’s the pertinent parts of the script:

GageHomeInternal = GageHome
GageHomeInternal[2] = GageHomeInternal[2] + gage_width_m

GageHomeInternal[2] = GageHomeInternal[2] + .0087 - .001
GageHomeInternal[1] = GageHomeInternal[1] + .0226

GageHomeInternalZ = GageHomeInternal
GageHomeInternalZ[2] = GageHomeInternalZ[2] + width_m - finger_length + 0.01

movej(GageHomeInternalZ, a=0.5, v=1, t=0, r=0)

x
x

A bunch of modbus stuff with stepper motor

x
x

movel(GageHomeInternal, a=0.5, v=1, t=0, r=0)
sleep(.5)

If you notice, that point is generated by copying it from GageHome and then modifying the x and Z values. GageHome and gage_width_m are defined and good - I can send the robot to GageHome.
Also note that the supposedly undefined GageHomeInternal is used to define another point - GageHomeInternalZ, without an error.

It’s only when it gets to the movel command that it doesn’t like GageHomeInternal.
Again, this has been working fine.

The only thing that we know happened between the last time this was successfully run and now is that I backed up all the programs & scripts on that control using an ftp utility (WinSCP), then deleted all the .bak* and .old* files from the control (using the same app).
It’s possible that something got corrupted in the process, but I can’t think of what might cause this.
The default.variables and default.installation files look normal.

I’m debating whether to continue to play around with it (simple program calling a version of this script which only includes the pertinent stuff), or just erase all the backed up files from the control and copy them back.

So I did create stripped down versions of the program and script - still referring to the same stored points and variables - and it worked fine.
We also tried running another couple programs, and were getting errors where it didn’t recognize functions which were clearly loaded.

So, still using the WinSCP utility, I erased everything in the /programs folder (programs, scripts, installation and variables files), then reloaded everything I had saved yesterday.

Seems to be working - one program isn’t going to the correct Z position when picking the part, but that’s a program which hasn’t been fully vetted yet, so we’ll see what’s going on there.

Now maybe we can get back to troubleshooting the original problem - stepper driver doesn’t appear to be communicating correctly through Modbus.

I’ll probably go back again at some point to erase the backup files again, but I’ll do it a few at a time to see if this occurs again. Haven’t had this happen before, but I don’t think I have removed as many files at once.