Bug fix for https://bugs.launchpad.net/lxml/+bug/1185332.