Fix a bug in the xsl to add empty headings

It was always adding a h2 for all levels > 1