Bug 1017896 - Ensure there is a template contents owner when creating template elements. r=bz