When units have escaped, the notification gets sent using 'unit_tile(punit)', where punit is the active defender unit. That gives inconsistent results, depending on whether punit was one of the units that managed to escape or not. Sometimes the escape notification comes from the tile units escaped from, sometimes from a tile one of them escaped to. I think it should always be the tile they escaped from, as different units might escape to different tiles so there's no single target tile.
When units have escaped, the notification gets sent using 'unit_tile(punit)', where punit is the active defender unit. That gives inconsistent results, depending on whether punit was one of the units that managed to escape or not. Sometimes the escape notification comes from the tile units escaped from, sometimes from a tile one of them escaped to. I think it should always be the tile they escaped from, as different units might escape to different tiles so there's no single target tile.