IMO you shouldn't use UIDs to check ANYTHING before your game is done. When I was trying to make doors I used them, but everytime I created a new object in my game all the UIDs changed.
I found that the best way to do doors (IMO) is using their IID and checking which layout the player is.
For instance, this way you could check that the player entered the third door on the first screen. Then you'd just have to program where he sould appear.
I think I overcomplicated it a bit in my game, but at least it's working now..