Small optimization in rebuild after reparent.

We only need to rebuild the shard graph for the old and
new master cells (might be the same cell).