LPS-39254 Optimize template engine PACL usage