Reworked ReferencePrefixAdapter, use now seperate counter for dossiers.
Added upgradestep: which cleanup the mixed-up old mappings.