fix bug 858481 - toc_depth = 0 for templates