fix parsing issue for lhe per-event weights

Backport of https://github.com/cms-sw/cmssw/pull/6340/commits