Item::get_volume() handles containers specially: it returns whichever is greater, the type's volume or the volume contained.  So e.g. plastic bags have a volume of 1, but can hold 30; if there's stuff in one it uses the contents' total volume.