bug #3254: error handling in onetemplate instantiate