Pushed this after discussion with Justin, but upon reflection, I don't think we can make this change. Whenever a template is rendered a new LetContext probably should be added.
The only case where we might be able to avoid this is when the "leaf" context is already a LetContext, but even then, we can't be sure that we shouldn't be adding another one. I think it's probably preferable to have an extra LetContext than not adding one when we should be.
Pushed this after discussion with Justin, but upon reflection, I don't think we can make this change. Whenever a template is rendered a new LetContext probably should be added.
The only case where we might be able to avoid this is when the "leaf" context is already a LetContext, but even then, we can't be sure that we shouldn't be adding another one. I think it's probably preferable to have an extra LetContext than not adding one when we should be.
Putting this PR up for further discussion.