The lookup_path__ code can now safely mutate the input path directly.