Fixes problems parsing XML docs with multiple PIs.