First I'll summarize what I think is your factual status and your question.
First Property: Foreclosed in 2008. Heloc on property was foreclosed out. Heloc is a written contractual obligation. The statute of limitations on a written obligation is 4 years from the date of breach. It appears that you are beyond the 4 years (assuming that you did not make any payments in the 4 years time). The Heloc debt on the First Property is likely barred by a statute of limitations defense.
Second Property: Foreclosed in 2010. Heloc on property was foreclosed out. Collection agency now owns the debt. Debt obligation is within the 4 years from date of breach.
Lien on Primary Residence. The only way for the debt collection company to record a lien is to first have a judgment (unless it applied for a prejudgment attachment). Even if it did this you have a homeowner's homestead exemption (amount depends on your age and marital status).
i hope that this helps you think about this issue.
This is a general answer only and you should seek the advice of counsel to address facts specific to your circumstances.