The lxml treewalker throws an IndexError if given an empty list.
This is a problem because with the lxml TreeBuilder parseFragment will produce an empty list for an empty input string, making spacial handling necessary compared to other tree types.
Demonstration of the bug.