There is a problem here if the target is moving. The bug that I fixed in 658c37a29999a55b9d574160066384c54509aed9 has been reintroduced.

Actually, maybe this should be applied to AiActivate too. I don't know if anyone is using it for moving targets, but I see no reason not to allow it.