Acoustic waves propagating through nonuniform flows are subject to convection and refraction. Most noise prediction schemes use a linear wave operator to capture these effects. However, the wave operator can also support instability waves that, for a jet, are the well-known Kelvin-Helmholtz instabilities. These are convective instabilities that can completely overwhelm the acoustic solution downstream of the source location. In this paper, a general technique to filter out the instability waves is presented. A mathematical analysis is presented that demonstrates that the instabilities are suppressed if the governing equations are solved by a direct solver in the frequency domain, if a time-harmonic response is assumed. Also, a buffer-zone treatment for a non-reflecting boundary condition implementation in the frequency domain is developed. The outgoing waves are damped in the buffer zone simply by adding positive imaginary values to the required real frequency of the response. An analytical solution to a one-dimensional model problem, as well as numerical and analytical solutions to a two-dimensional jet instability problem, are provided. They demonstrate the effectiveness, robustness, and simplicity of the present technique.