Fix AutoTarget bug for static defenses.