LPS-32831 Revert changes

As we agreed with Mike Han by email, in order to make bug fixings in Site Templates backportable to previous versions, his latest changes to improve performance will be reverted.