You can select those images that you have accidentally flagged and then un-flag them.
Maybe exporting the correct flagged photo's, importing them which means there are duplicates and then apply the flag on the originals of those duplicates.
Unfortunately, when you import a catalog, you can't import as duplicates photos that already exist in the catalog.
It is possible to recover the flag settings from the old catalog, but it involves a number of steps and, unless you are very confident about switching catalogs, using filters, reading and writing metadata, etc., it is likely easy to make a mistake and screw things up even more. Here are the steps:
0. Make a backup of your current catalog and all of its photos (very important in case you screw up!).
1. In your current catalog, choose All Photographs, disable the filter bar, expand all the stacks, select all photos and do Metadata > Save Metadata To File.
2. Make a copy of the backup catalog and open the copy.
3. In that copy, choose All Photographs, disable the filter bar, expand all stacks, and select all the flagged photos using the Library filter bar.
4. Do Metadata > Read Metadata From File. This will make sure that the copy of the backup catalog will have all the metadata and develop settings from the current catalog for the flagged photos.
5. In the Metadata panel, select the EXIF preset. In the User Comment field, verify that it is blank, and then set it to be "XXXFLAGGEDXXX". If the User Comment field is not blank, that means at least some of the flagged pics have some value in that field. So try another little-used IPTC field like IPTC Headline or IPTC Job Title.
6. Do Metadata > Save Metadata To File (again, with all the flagged pics selected). Now, all the pics flagged in the copy of the backup catalog will have "XXXFLAGGEDXXX" written to their metadata.
7. Open the current catalog.
8. Choose All Photographs, expand all stacks, and select all of the flagged pics and unflag them.
8. Choose All Photographs, disable the filter bar, select all the pics, and do Metadata > Read From File.
9. In the Library filter bar, do a text filter "Any Searchable Field Contains XXXFLAGGEDXXX". That will result in all of the pics that were flagged in the old catalog.
10. Select all of those pics and flag them.
That's very clever, I'll try it out. Thanks a lot.