Experimental study of relative level populations in beam-foil excited Ar7+ and Kr7+