fixes #965 - closing tags for static sections are correctly identified