@ezequiel do you want to propose an alternate solution?

Short of re-implementing a path resolving algo, I'm fine with @juandopazo solution here.