Add thread safety in Velocity template evaluation.