[Client] Fixed handling of paths that don't lead to the final target