We implement a novel method to detect systemically important financial institutions in a network. The method consists in a simple model of distress and losses redistribution derived from the interaction of banks' balance-sheets through bilateral exposures. The algorithm goes beyond the traditional default-cascade mechanism, according to which contagion propagates only through banks that actually default. We argue that even in the absence of other defaults, distressed-but-non-defaulting institutions transmit the contagion through channels other than solvency: weakness in their balance sheet reduces the value of their liabilities, thereby negatively affecting their interbank lenders even before a credit event occurs. In this paper, we apply the methodology to a unique dataset covering bilateral exposures among all Italian banks in the period 2008-2012. We find that the systemic impact of individual banks has decreased over time since 2008. The result can be traced back to decreasing volumes in the interbank market and to an intense recapitalization process. We show that the marginal effect of a bank's capital on its contribution to systemic risk in the network is considerably larger when interconnectedness is high (good times): this finding supports the regulatory work on counter-cyclical (macroprudential) capital buffers.