On the Aggregation of Firm-Wide Market and Credit Risks