Don't perform clearDirty() multiple times.
Return empty DirtyListWrapper or DirtyMapWrapper instead of null.