Imported targets do not themselves build, but we can follow dependencies through them to find real targets. This allows imported targets to depend on custom targets that provide the underlying files at build time.
This tests linking to an imported target that is not visible but is a transitive dependency of a target that is visible. See issue #8843.