export: Fix exporting targets with multiple file sets

Reported-By: Eugene Shalygin <eugene.shalygin@gmail.com>
Fixes: #27412
2 files changed