Account for subparts in the template layer. Does not fix TOC