Fix #1312 - pf infinite loop