I will usually get this error, if I select items in a folder and its subfolders and try to add or remove tags.
The only way I found around this is to use a different option for tagging after the error appeared. For example, instead of changing tags in the preview pane on the right, use Edit Tags in the toolbar or Tags… in the context menu, use a shortcut like CTRL-0, drop the files onto a tag in the sidebar on the left or change the selected files.
Ultimately, I’ve built an app, that helps me with some of these issues when manually tagging files.