Observation of the density dependence of the closed-channel fraction of a 6Li superfluid