You are using one time findNearest() and one time getNearest(). I don’t recall right now which is the correct one, but I’m pretty sure only one of these will work.
That’s funny, I never noticed this. I actually never had the idea to use an items findNearest-function. I usually try to read the target, or track enemies over several gameticks to guess where they are going. Yours is… so much faster.
Anyway, after I opened an issue about this: Did you try to swap either method-call with the equivalent other?
Try to use findNearest() in both cases, or getNearest(). Maybe the info-popup is wrong.
Even if findNearest() works as well as getNearest() for the base object (I have no idea why there are two functions doing the same thing by the way), none of them works with the item object: