This is just lien stripping under another name, which was allowed prior to bankruptcy reform. The primary lienholder holds the house as collateral. HELOC is a second, they wouldn’t get anything in the event of foreclosure anyway.
They would if there were any equity, which in this market is unlikely.