Migrate recursive collapsing