Stability estimates for a class of Helmholtz problems