Flow-acoustic resonances leading to high unsteady pressure levels may occur in flow past cavities. The long-standing semi-empirical model of Rossiter, and a more complete theoretical model recently developed by the authors, both predict the existence of several resonance frequencies. The unsteady pressure spectra measured in experiments typically also contain several resonance peaks, consistent in nature with the theory. However, in wind-tunnel experiments where the cavity is embedded In one of the wind-tunnel walls, the pressure spectrum may shift to the case of a single dominant frequency, sometimes quite abruptly and only for a narrow range of flow speeds. In the present paper, we develop a modified theoretical prediction method that explicitly accounts for the presence of wind-tunnel walls. The cross-stream eigenmodes play a central role in the theory. We show that, in the frequency (or Mach number) band where a higher-order eigenmode is cut-on in the tunnel-cavity section, but cut-off in the upstream and downstream tunnel sections, the nearly-trapped nature of the acoustic field causes a dramatic increase in the growth rate for the global flow-acoustic resonance mode. This provides an explanation for the dominant mode behavior that has been observed in experiments.