If notes underlying even some of these mortgages were improperly assigned or lost, that will surely complicate pending legislation intended to allow bankruptcy judges to modify mortgage terms for troubled borrowers. A so-called cram-down provision in the law would let judges reduce the size of a loan, forcing whoever holds the security interest in it to take a loss.

But if the holder of the note is in doubt, how can these loans be modified?

Bookkeeping is such a bore, especially when there are billions to be made shoveling loans into trusts like coal into the Titanic’s boilers. You can imagine the thought process: Assigning notes takes time and costs money, why bother? Who’s going to ask for proof of ownership of these notes anyhow?

But as the Fernandez case and others indicate, bankruptcy judges across the country are increasingly asking these pesky questions. Two judges in California  one in state court, another in federal court  issued temporary restraining orders last month stopping foreclosures because proper documentation was not produced by lenders or their representatives. And in another California case, a borrower’s lawyer was awarded $8,800 in attorney’s fees relating to costs spent litigating against a lender that could not prove it had the right to foreclose.

California cases are especially interesting because foreclosures in that state can be conducted without the oversight of a judge. Borrowers who do not have a lawyer representing them can be turned out of their homes in four months.

Samuel L. Bufford, a federal bankruptcy judge in Los Angeles since 1985, has overseen some 100,000 bankruptcy cases. He said that in previous years, he rarely asked for documentation in a foreclosure case but that problems encountered in mortgage securitizations have made him become more demanding.

In a recent case, Judge Bufford said, he asked a lender to produce the original of the note and it turned out to be different from the copy that had been previously submitted to the court. The original had been assigned to a bank that had then transferred it to Freddie Mac, the judge explained. “They had no clue what happened after that,” he said. “Now somebody’s got to go find that note.”

“My guess is it’s because in the secondary mortgage market they have been sloppy,” Judge Bufford added. “The people who put the deals together get paid for the deals, but they don’t get paid for the paperwork.”