It's difficult to tell what can be wrong.
When debugging complex issues like yours I use Browser Log a lot. I would add debug output to all critical events, printing the array values, instance UIDs, variables etc.
Then run the game in debug mode, pause before and after the function call, open the browser log, inspect the contents of the array, check positions of the black squares etc.
Also, I don't see a "Pick by UID".
It's not under System object. It's Virus -> Pick by unique ID