We could actually just use path_len here, instead of a "ret2" (elided rant about names ending in 2)