use allcaps TRAITS instead of BAG_TRAITS for the Bag's TRAITS type in the template