LPS-44239

Hey Hugo,

I agree with Igor that it would be hard to simplify this down since you need to keep track of how many directories up you need to go. I source formatted it, though, so let me know if you think more needs to be done to it.

Thanks.