Bug fixing in FastPrimaryVertex - backport in 72X

backport of  https://github.com/cms-sw/cmssw/pull/5832