Add range and table revision checking to avoid abend.
Add range and table revision checking to avoid abend.

PR:bin/169707
Submitted by:Dan Lukes <dan@obluda.cz>
MFC after:3 days.

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