With this context in place, can you outline the goal behaviour with the changes here?    Its not clear to me why the fix needs to change `useLastVisibleTarget`, and if the main motivation was to make units go idle when the target dies, then that is actually a significant change that we need to consider in more detail (and for more cases) - putting it outside the scope of this bugfix.