* contrib/lisp/org-export.el (org-export-collect-headlines): Simplify function, in order to allow greater flexibility to build a proper table of contents.