From within templates, dynamic lookup of variables seems to work. I can declare a variable in the init.pp file. It shows up as undefined in the configuration.pp file. But then it will work fine within the templates created by configuration.pp.
Steps to Reproduce:
I've created a github repo with a simple module that shows off the issue. Basically its just creating a dynamic lookup variable in a template though, nothing special.
The variable should return undef which is what the manifests return.
The variable returns the value that is assigned.
Both agent and master are puppet 3.2.2