pass in swig to compileTemplate() - swig var is no longer scoped to the module