Resolves #316 by correcting variable name typo.
Test of len(header_doc) should be len(header_class) since it is the value used to create the headers list.
When header_doc is a simple lxml.Element with no children, len(header_doc) == 0.