As noted by Peter Jeremy, r234528 only partially fixed the infinite loop bug introduced in r187302.  This completes the fix.
As noted by Peter Jeremy, r234528 only partially fixed the infinite
loop bug introduced in r187302.  This completes the fix.

PR:		167039
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