Trapping of rare gases during the condensation of solids