Fix Invalid HTML

Invalid HTML on every last `</ol>` when no depth reset (headline not
changed from the lower level into the higher level).