Fix reference resolution jumping to old position if the position of a definition was moved.