Add `bag_stats` into de-duplication function

Fix typo on the way.