back ported David Dagenhart's fix for history provenance problem
Adjust group indices when product registry is enlarged
Correctly add new entries to cached run/lumi principals when product registry is enlarged
Don't call Group::provenance() outside of an event