Fixed long-standing bug in TreeEP (now, within-loop propagation optimization works)