The role of oxygen on the stability of gettering of metals to cavities in silicon