Full workaround for old libxml bug.