Density is directly proportional to mass (inversely proportional to volume) but only in the circumstances where the volume remains the same. If the volume remains the same and mass increases, the density must increase in order to fit the additional mass into the same volume of space.