add moduleInstance to templates for 1.3.6-type modules
change var name
Merge pull request #1212 from craigh/templatevar

add moduleInstance to templates for 1.3.6-type modules