A very basic but faster script could look like this:
tell application id "DNtp"
try
set theDatabase to current database
set theRoot to root of theDatabase
set theRecords to contents of theDatabase whose location begins with "/Tags/"
repeat with thisRecord in theRecords
replicate record thisRecord to theRoot
end repeat
end try
end tell
BTW: File > Verify & Repair Database… will recognise & repair such items in the next release too.
Seems I used selected records for testing and didn’t think the final usage through. The simple solution to be able to select all tags is a search for tags:*