FELIX-3300: fix calculateExportsFromContents to avoid exporting empty packages, also only use calculateExportsFromContents when analyzing attached files