PFEGammaAlgo: fix bad read found by valgrind

Fix valgrind error reported by @Dr15Jones.