Cleans up orphaned versions from the value sets.