resolve-undo.c: use the right index instead of the_index