Fix a long-standing bug in the rename case previously masked by another bug just fixed in .db file updating.
Fix a long-standing bug in the rename case previously masked by another bug
just fixed in .db file updating.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase