I’ve actually fixed this on the master branch already, post-0.10.
To fix things on the release build, you’ll have to do something like this on the command line:
sqlite3 ~/.mozilla-iot/config/db.sqlite3 "SELECT id FROM things"
# Find the ID of your old thing(s).
# The IDs were previously identical to the name you assigned.
sqlite3 ~/.mozilla-iot/config/db.sqlite3 "DELETE FROM things WHERE id = 'your id'"
Replace your id
with… your ID.
After that, you can restart the gateway:
sudo systemctl restart mozilla-iot-gateway