export: Allow depending on targets exported multiple times

Fixes: #26556
17 files changed