v2: fix pdag path compression
v2: fix pdag path compression

The previous commit did only compress 2 nodes at max

janmejay/liblognorm,janmejay/liblognorm,radu-gheorghe/liblognorm,radu-gheorghe/liblognorm