Fixes U4-5077 doc types with compositions

@nul800sebastiaan  PR with proposed fix for compositions issue.
Ah, yes. It should of course return -1 and not 0 as the parent id.