Fix recursive path walking