[Object][ELF] Range-based loop simplification.

No functional changes.