This template looks like it is trying to do too much. Will more than 1 of these fragments ever be rendered in a single email? If not, this should be a parent template, with 3 child templates that just include the parent and define one of the fragments.