The detection of spectroscopic features in the infrared consistent with laboratory spectra of pure CO and a mixture of CO with CO2 is reported in the lines-of-sight to the obscured young stellar objects WL5 and WL12 in the rho-Oph dark cloud. The FWHM and central wavelength of the feature in WL12 are also consistent with laboratory values for O2:CO ice. The observed spectra are presented with laboratory spectra of solid CO in three different ice matrices which have parameters comparable to those observed. Column densities of pure CO are obtained for both lines-of-sight and compared with those for water ice. The results strongly suggest that formation of volatile mantles in the denser regions of this cloud is hierarchical, with CO condensing after the formation of water ice is largely complete, and with a rigorous segregation of these two ices.