Test that pathLength works inside a shadow tree