D1410 added support for treedirstate when collecting dirstate_size for
sampling. However, it also changed from querying the inner dirstate map (which
is not available with treedirstate) to the outer map. This breaks Eden, which
prevents calls to __len__ on the outer map.
Revert the change for non-treedirstate dirstates, and handle treedirstate
explicitly.