Hi Simon,
Well, as far as I know, there are two way you can use template(s) to create an instance. First is you double click on the template and second is to use the VI-Server to programmatically create an instance. In your case, looks like you are using the first method you would have to deal with the popups. If you were to use the VI-Server you would want the template VI to be able to break the loop before when your top level handler execution is stopped (or exits). This way you would never see an popup to save the vi's. This is just my experience. Hope this help.
Best Regards,
Iqbal