The role of second phase in localizing deformation