We're using Utils::FileInProjectFinder to resolve target paths back to paths on the host. This is fundamentally a heuristic, which tries to match a maximum common postfix between the target path and any files found in the project, in search paths, or in the sysroot.
There can be many files called "qmldir" in a project, as each QML component not implicitly defined by files in a directory needs to have one of those. The QML engine speculatively asks for qmldir files in various paths when trying to resolve a component name. It will also ask for files that don't exist on the target, but we cannot determine that on the target side because we might be running without deployment or the user might have added extra files during the current preview session.
Therefore, the path resolution heuristic in FileInProjectFinder will sometimes send wrong qmldir files for some of those requests. This is fatal for the preview, as the resulting QML components don't match what the application expects.