This was working for LocalFileSystem as they work for any directories/path. It's hard to test this these days, as we don't have remote tests inside dvc, so it was not caught. Potentially fixes #7718.