Repository: html5lib/html5lib-python

Issue:
etree treewalker infinite loop
This goes into an infinite loop:

```python
import html5lib

frag = html5lib.parseFragment("<b><em><foo><foob><fooc><aside></b></em>")

walker = html5lib.getTreeWalker("etree")

print list(walker(frag))
```

Discussion:
codecov-io: ## [Current coverage][cc-pull] is **90.83%**
> Merging [#259][cc-pull] into [master][cc-base-branch] will increase coverage by **<.01%**

```diff
@@             master       #259   diff @@
==========================================
  Files            51         51          
  Lines          6836       6840     +4   
  Methods           0          0          
  Messages          0          0          
  Branches       1312       1312          
==========================================
+ Hits           6209       6213     +4   
  Misses          468        468          
  Partials        159        159          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [2d37673...cbc1b34][cc-compare]
[cc-base-branch]: https://codecov.io/gh/html5lib/html5lib-python/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/html5lib/html5lib-python/compare/2d376737a6246ebb38a79600a7fe75abd923cf3e...cbc1b34806178bd5119464865c263c0e254cfa55
[cc-pull]: https://codecov.io/gh/html5lib/html5lib-python/pull/259?src=pr

Patch:
diff --git a/html5lib/treebuilders/etree.py b/html5lib/treebuilders/etree.py
index d394148..4d12bd4 100644
--- a/html5lib/treebuilders/etree.py
+++ b/html5lib/treebuilders/etree.py
@@ -100,6 +100,7 @@ def getETreeBuilder(ElementTreeImplementation, fullTree=False):
             node.parent = self
 
         def removeChild(self, node):
+            self._childNodes.remove(node)
             self._element.remove(node._element)
             node.parent = None
 


Test patch:
diff --git a/html5lib/tests/test_parser2.py b/html5lib/tests/test_parser2.py
index 0ec5b04..b7a92fd 100644
--- a/html5lib/tests/test_parser2.py
+++ b/html5lib/tests/test_parser2.py
@@ -7,7 +7,7 @@ import io
 from . import support  # noqa
 
 from html5lib.constants import namespaces
-from html5lib import parse, HTMLParser
+from html5lib import parse, parseFragment, HTMLParser
 
 
 # tests that aren't autogenerated from text files
@@ -88,3 +88,8 @@ def test_debug_log():
             expected[i] = tuple(log)
 
     assert parser.log == expected
+
+
+def test_no_duplicate_clone():
+    frag = parseFragment("<b><em><foo><foob><fooc><aside></b></em>")
+    assert len(frag) == 2