Reimplemented for StringTemplate v4.