I was recently confronted with ‘tags’ that were actually groups nested within in the tags. If I understand correctly, that might have been caused by above behavior?
Depending on the way I deleted some of these groups - as far as I can recall - some files in those ‘groups within tags’ seemed to also end up in the trash. It’s difficult to say for sure, as I dilligently deleted these weird groups and checked macOS trash as well (I’ve actually backed it up to be sure nothing gets lost) for any files getting lost.
Below is a thread that in essence was a bug report of the organize button in DTTG3, but seemed to be related to these ‘groups within tags’. According to the DTTG 3.0.4 release notes, @eboehnisch has fixed the organize button. He might also have a better understanding whether the behavior of previous versions of DT you describe above might be what happened and caused the organize button to malfunction.
Like the recent ‘ghost’ files are now automatically detected (at least in DTTG) and thus made visible, I wonder whether the functionality of that script shouldn’t also exist as a standard in all DT3 installations. If people are unaware of records that can be nested under tags as a remnant of previous DT versions, and those can be deleted by deleting just the tags, some users might indeed delete records that shouldn’t be.