This is a behaviour change to make fleeing less broken [in my opinion]
Currently, units flee away from a target, so if that target moves closer, the unit can keep fleeing infinitely. This can lead to pretty long chases across the map, which is annoying. It also forces chasing units to move at running speed, or they might never catch up the fleeing entity - and this conversely forces us to make fleeing units slower (when running) than most units, or hunting won't be possible.
This diff makes it so that units instead from from the position of the attacker. They won't flee still if the attacker moved closer in the meantime - only if they have a reason to flee again, such as being attacked again.
This also makes it a bit less tricky to commit D1880 - possibly.