Think about it? The employer deposited to a wrong bank account. One that no longer existed for the OP. Had that bank account never been the OP's the employer absolutely would have been liable. If would have been up to the employer to recoup the money from the bank.
The bank took advantage of that mistake and kept the money. There is a definite question as to whether or not the bank actually had the right to do so.
The employer properly replaced the money to the OP via a paper check, but now wants the money back from the OP.
Potentially, no one's hands are clean here. The employer because they made a flat out mistake, the OP's because he had an outstanding debt that had not been resolved, and the bank's because they may not have had the right to do that. (statute of limitations etc)
You are thinking about it from the employer's side and viewing it as the OP being paid twice, and that is perfectly understandable, but its just not that black and white. The employer made a flat out, and serious, mistake. OP needs to consult a locate attorney.