High-velocity-layer (HVL) and low-velocity-layer (LVL) models are two kinds of the most common irregular layered models in near-surface geophysical applications. When calculating dispersion curves of some extreme irregular models, current algorithms (e.g., Knopoff transfer matrix algorithm) should be modified. We computed the correct dispersion curves and analyzed their sensitivities due to several synthetic HVL and LVL models. The results show that phase-velocity dispersion curves of both Rayleigh and Love waves are sensitive to variations in S-wave velocity of an LVL, but insensitive to that of an HVL. In addition, they are both insensitive to those of layers beneath the HVL or LVL. With an increase in velocity contrast between the irregular layer and its neighboring layers, the sensitivity effects (high sensitivity for the LVL and low sensitivity for the HVL) will amplify. These characteristics may significantly influence the inversion stability, leading to an inverted result with a low level of confidence. To invert surface-wave phase velocities for a more accurate S-wave model with an HVL or LVL, priori knowledge may be required and an inversion algorithm should be treated with extra caution.