Support rebuild with Havana child cells

This patch is needed while there are Havana child cells, it will
still work fine in icehouse environment.