Note that all these details are largely considered internal in the master. As I've said earlier, it might happen that dirnodes and joinnodes get rewritten completely (I'd like to see a solution where at least the dirnodes actually get compiled from the code in the directory, so that typing and inheriting would work better).
So if you write code that dig around in these things, you better put it in the master (having variants of Program.defined and Function.defined that correctly handles all these pecularities would be nice).