Dislocation effects in powder diffraction