Correct errors in etree.to_etree
Support for callables and optionally not exhausting generators