Shashlik fix HGcal

This commits fix the crashing of the 12200 workflow.
The second commit works, but I'm not sure if this is the correct thing to do.
I've sent an email to Jeremy Mans.