Improve theme support for headings.