Prevent anchor jumping (fixes #632)