fix 'Tried to mark AI %d dead, but is already dead' (probably also #3585)