HPGraph: Fix off-by-one error in translation to loop style