This effect can also occur in contaminated ground, where the geological regime is such that the pH (a measure of acidity) can effectively lock-up the normally mobile ons.
For example Heavy Metals, such as Cadmium, tend to be very mobile at low pH - under acid conditions, but at high pH - under alkaline conditions (chalk, limestone etc) they do not pose a significant problem.