Register the correct entry

Previously we worked with the previous index, but the entry could have
been moved