This code works as designed. The example given shows that the provider is broken since it parses beyond the end tag for the child element of the IQ packet, which it is not supposed to do according to the javadoc fro IQProvider.
Unfortunately, it does mean that the stream parsing is now screwed if the provider does not play nicely.
See: http://imaginateaqui.net/tmp/email-openfire-bug-smack.html