As reported by @Angen, even with D1979.
In A23, units that are approaching an enemy (Combat.Approaching) will carry on moving to their last waypoint if the target dies, and then go idle.
In current svn and with D1979, these units never go idle.
This difference is because svn doesn't send MovementUpdate messages when out of waypoint - something I've done to avoid hiding bugs such as this one.
Instead, we should explicitly decide in UnitAI what we want to do, which is done here.
This also makes it so that error messages bypass range checks in some other states, since we might run in the same infinite issue.