Powder diffraction characterization of stacking disorder