Fix SQLite index name collisions.
Closes #499