Compensation for dispersive elements is necessary for efficient multiple-pass and intracavity nonlinear frequency-conversion devices. We describe the use of a wedged quasi-phase-matched crystal to compensate for the phase shifts introduced by mirrors in such devices, taking advantage of the periodic variation in the relative phases of the interacting waves in a quasi-phase-matching grating. A representative double-pass second-harmonic generation experiment with a 5-cm -long periodically poled lithium niobate crystal showed the expected conversion efficiency enhancement.