Fix race condition in index table updates.