Sounds like a corrupt index, which is surprising. What version of postgres is this? I would likely wipe the database and try again. You’ll likely need to do it a bunch of times anyway as you debug other issues with topics.
The other option is to try to rebuild that index and delete duplicate records until it works.