Segregation during solidification with spongy deformation of the mushy zone