Filter AI targets based on what it can actually attack. Fixes #3763.
Merge pull request #3782 from pchote/hackyai-target-fix

Filter AI targets based on what it can actually attack.