fix detection/loading of old-format template files