ed(1): switch two statements so we check the index before dereferencing.