There are both build-time and run-time bugs when trying to include templates in an executable. See the previous thread
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=506500000008000000CA290000&ECategory=LabVIEW.LabVIEW+General
for a description of a workaround.