fix for issue 393 - always reset libxml_disable_entity_loader

by resetting libxml as soon as possible. I think it's unlikely to have errors while iterating the document here.