Sprite(index), and Sprite.UID are two different things.
Sprite(index) is the index for that instance as it was created from 0 to sprite.count.
object.uid is a number assigned to any object when it is created, again from 0 to the number of objects in the game.
Note: uid starts when you add things in the editor, and continues at runtime when you create new objects, including instances.
What you probably want here is sprite.iid. No need for the () since you dont need to pick anything else.