recovery: fix variable shadowing in recover()