fix to code generation to correctly track multiple defs with the same name .. change:: :tags: :tickets: 9 "directories" can be passed to TemplateLookup as a scalar in which case it gets converted to a list