Well, looks to me like if a mob isn't in line of sight, it jumps to the next i, but doesn't target the next mob. So since it's the same target, it's just going to check it again and it's likely to still be out of sight.
Second, shouldn't Throw Stone in the declare be in quotes? That's always...