Eliminate uneeded index.

This makes the code simpler and clearer, the functionality
has not changed.