Fix logical error where defining _path on the prototype had unwanted side-effects

Redefining the template should not permanently break the constructor