MFC r270256, r298640:
ed(1): switch two statements so we check the index before dereferencing.
Approved by: pfg