We present results of a systematic x-ray scattering study of the effects of Mg doping on the high-fieldincommensurate phase of CuGeO3. Lorentzian-squared line shapes, the changing of the first-order transition tosecond order, and the destruction of long-range order with infinitesimal doping are observed, consistent withrandom-field effects in a three-dimensional XY system. Values for the soliton width in pure and lightly dopedCuGeO3 are deduced. We find that even a very small doping has a drastic effect on the shape of the latticemodulation.