This is an utility to go with the existing length_or_fallback().
We now create a layout tree directly from the DOM tree. This way we don't actually lose text nodes ^)