Bug: a couple of bugs with defn templates