On Harmonic Generation in X-Ray Free-Electron Lasers with Variable Undulator Deflection Parameter