[#33938] Prevent saving duplicate tags, causing a duplicate SQL error. Fixes #4011