path_len can't be used in this context, we need its old value.