Effect of violations of the structure and layer packing on the diffraction pattern of gibbsite and bayerite