Assign template locals in render step

This should enable rendering the same template over and over instead of needing to construct a new one each time.