Reset backup_idx to 0 when resetting backup nodes

Change-Id: Ia2af183ab6cbaa31f30400c885478c66e908bdd0