Phoenix-1112: Atomically rebuild index partially when index update fails

Can you please follow the 4 space convention that's used everywhere else?