The g is not for a same `{{var}}` appearing more than once, it for replacing all vars in the string at once.