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

Please revert - I've already made this change.