Segregation and impurity effects in silicon grown from the melt in the presence of second phase formation