Stop forceSearchIndex.php from going into loops.

These loops were caused tracing through redirects when picking up
revisions to index.  This caused us to sometimes jump backwards or
forwards in the list of ids to index.  After this is merged we'll have
to reindex everything on beta using forceSearchIndex.php.  We'll get
used to that before long I think.

Change-Id: I0ab9b8e4f76dbf610cd00a72f66b51b835469d4b