Fix problem with TOC and nested tags