Yep, but unfortunately this is not possible at the moment, uid_in only accepts a static <uid> value. In my case, this would be OK to lookup the dictionary first by name or whatever and use its uid with uid_in but again, uid_in is just not flexible enough.
For now what I would really like to investigate is the filtering based on nested node value mechanism as you said it earlier and it seems that query variables could be the way to do it for any level of nesting. The questions is, how efficient is this or what performance problems we may find later?