Fix mal-formed regexp matching any template