Section condition fix

Need to test against the headings since we've added the "top" section to the section var