Fix SQL import script - error in duplicate tag handling