fix bug with AI

Before, the AI would not check whether a target is already added to the
List of targets. So it would add a duplicate element. Then when it pops
these coordinates out, it would fire at the same location multiple
times.

The fix here is to mark the location of an inserted target coordinate
"dirty", then check on every insert if the coordinate is already marked.