Fix a panic caused by a corrupted table when the header is still valid. We were checking the state of the header and not the table.
Fix a panic caused by a corrupted table when the header is
still valid. We were checking the state of the header and
not the table.

PR:		119868
Based on a patch from:	Jaakko Heinonen <jh@saunalahti.fi>
MFC after: 1 week

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