Fix #1039: Certain libxml versions cause some config handlers to randomly produce invalid results due to corrupt XPath result sets