With a mutable set this would become `if !added_bounds.insert(trait_ref.def_id) {...}`