Improve missing UID handling in Entity#findUid