XML exports contain Group and Stem ids. If re-imported to the same repository the import will fail because of unique constraints.
The first version of the import/export tool allowed for relative exports so that individual groups or stems and their children could be exported and then imported in a different location. Rather than export complete path names the path representing the starting point for an export would be replaced with *. On an import the * would be replaced with the path for the import location. This does not work if the id is present.
For composites group ids are always used and no attempt is made to export a relative path prefixed with *.
If exporting a stem without the -includeParent option the stem itself should not be exported - just the children - but the stem is exported.
Most users of the tool will export / import the whole repository and that should be working OK. I'm not sure how much of what appears to be wrong now was always wrong or has been broken subsequently