Improve handling of paragraph-starting elements.