The global financial crisis 2007-2009 has shown that the common belief that credit risk can be diversified is deeply flawed. This is due to the ever present correlations in financial markets. We consider the problem of two credit portfolios on a nonstationary and correlated market within the framework of the Merton model. This structural model allows us to take fluctuating asset correlations into account. We use an ensemble approach which preserves analytical tractability and yields results that coincide with empirical data. This allows us to derive the multivariate distribution of credit portfolio losses. We show that for two disjoint credit portfolios diversification does not work in a correlated market. Additionally we find large concurrent portfolio losses to be rather likely. Studying the portfolio loss correlations we show that significant correlations emerge not only for large portfolios containing thousands of credit contracts but also for small portfolios containing only a few credit contracts. We extend the model to the effect that we consider two credit portfolios on two markets which are on average uncorrelated. Furthermore we include subordination levels. At maturity time the senior creditor is paid out first and the junior subordinated creditor is only paid out if the senior creditor regained the full promised payment. This is related to CDO tranches and gives further insight to multivariate credit risk.