SM-1546: namespaces declarations missing in some cases when using the FragmentStreamReader / StaxSource