Rename variable name from 'index' to 'idx' to avoid shadowing index(3).

Noticed by:	dim
MFC after:	2 weeks