UID and IID are different from each other. You pick by IID.
UID is unique.
IID only is unique along all instances of an object and gets automatically assigned starting at 0 and counting up.
So your code would need to be
pick instance 0 of button
pick instance 0 of text
pick instance 1 of button
pick instance 1 of text
Or you swap it with picking by UID, then your code would work as well.
I probably would give each object an instance variable though and identify them with the help of this variable. So for example the buttons get a variable named buttonID, you set it to a different value for each button and can pick them with by comparing the instance variable.
This will be a more descriptive way of doing things and could help you to understand what exactly the code is doing, when you come back to it later on for whatever reason.