(hopefully) Fixes one of the seg-faults described in https://lblogbook.cern.ch/Shift/6235
/cc @bleverin @luwitola @lohenry @peilian @ldufour