Fix Bug 925043 - TOC contains empty <code> tags

Prior to this fix all the document's code tags were put into the table of contents.
https://bugzilla.mozilla.org/show_bug.cgi?id=925043