Find the last occurence of xml header when skipping extraneous plugin output