I have discovered a case where the previous patch causes an infinite loop. The new patch I'm attaching resolves that issue