Ensure selectable container fix

This fixes the issue when inserting a node with a child node but no text content, a```BR``` is added to the wrong place.
E.g. ```<p><b></b></p>``` => ```<p><b></b><br></p>``` when it should be ```<p><b><br></b></p>```
Is this definitive? I wish there was a nicer way to check whether an element can have children or not. What if, in the far future, someone creates a custom element that is self-closing (if that's even possible)? It won't be matched.