Ensure barcodes are set properly in McEventCollectionFilter in HepMC3-based builds
See merge request !58195 (merged)