Catch exception from ensure_index and retry.
TODO: This really needs a DAO layer so we're not shoving retries in the
middle of unrelated business logic.