The effect of foreclosure:
A senior lender owns the debtor's real property, subject to real property taxes that are due. Under recently enacted law, the lender has an obligation to maintain the real property. As a general rule, as long as the lender uses non-judicial Foreclosure proceeding (Trustee's sale), the lender has no action against the former owner for money damages whether the loan is recourse or non-recourse.
After a senior loan Foreclosure, the holder of a loan secured by a junior deed of trust (or mortgage) has no security. If this lender holds a non-recourse loan, the lender has no action against the former owner.
If the junior lender holds a recourse loan, the security (the real property) is gone. The lender does have the right to pursue money damages against the former owner. However, this lender must file a legal action against the former owner to pursue money damages. The result is that it will take one year or more to enforce this right.
If the lender holding a recourse obligation is the same as the senior lender, court cases hold that the junior lender cannot as a matter of law pursue the former owner for money damages on a senior lender foreclosure. Until the junior takes legal action, the former owner has no liability for the bank loan. If the junior lender files a lawsuit and/or obtains a judgment, the former owner can file a Chapter 7 Bankruptcy and get rid of this debt and other consumer debt (see Bankruptcy and Foreclosure - Will Filing for Bankruptcy Protect my Home from Foreclosure?).
Example: A buyer owns a home worth $350,000., subject to a senior loan held with Wells Fargo Bank and a HELOC also held with Wells Fargo Bank. The senior loan balance is $400,000. The HELOC loan balance is $75,000. Both loans are a result of refinancing, so both are recourse loans. The senior Wells Fargo loan forecloses using a non-judicial foreclosure.
The result - senior lender cannot pursue money damages against the former owner because the senior lender used the non-judicial foreclosure process. Wells Fargo also holds a HELOC - Wells Fargo cannot pursue money damages against the former owner because the same bank holds both loans.
The result would be different if the HELOC was held by another bank. After the senior loan foreclosure, the HELOC lender ("sold out junior") can pursue money damages against the former owner. The question is whether in this case the HELOC will pursue the former owner, who has now lost the property, is probably without funds to satisfy a judgment, and may file a Chapter 7 Bankruptcy to get rid of the debt altogether.