Fix cms-sw/cmssw#5607

@makortel let me know if you have issues.