Fix build.
Merge topic 'minor-cleanup' into next

4e2a72b Fix build.
Avoid certain actions on IMPORTED targets.

As we're iterating over IMPORTED targets now, handle them in
the loop body. The existing behavior is harmless because generally
nothing is done anyway for IMPORTED targets in these code paths,
because they do not have sources for example.
Merge topic 'minor-cleanup' into next

41e48c4 Avoid certain actions on IMPORTED targets.