I ran into this problem while working on #12939, since process_offset_parent_query needs to find at least one fragment corresponding to an element in order to produce results. This can also have an effect on rendering, e.g.:
<span style="border: 1px solid black; padding: 12px; background-color: red;"></span>
In most browsers, that element looks like this:

In Servo, it isn't rendered and doesn't affect the layout.
I've got a fix for this already, though it introduces a couple more rendering bugs which I suppose I should fix as well before submitting a pull request.