Typically, you do not have to look through the hierarchy of pages. If you are requesting /foo just override the master template value with a property tag in foo.tcl/adp.
The global value would only be used in your adp if it was the last value set, just like any other variable.
Here is another good reference:
https://openacs.org/doc/templates.html
Regards,
Ryan