Fixes index links.

When specifying an index entry it needs to be followed
by a regular, non-conditional environment.
"todo" is conditional which led to index links being
created with targets that point into the void.