WASHINGTON — It's no surprise that Federal Reserve Board Chair Janet Yellen took a beating during two days of monetary policy hearings this week, particularly given the resurgence of an effort to "audit the Fed" and continuing questions about its economic strategy.

What is shocking, however, is that the lawmaker that did the most damage to Yellen was Sen. Elizabeth Warren, an ally of the central banker, and that the Fed chief effectively capitulated to the Massachusetts Democrat during the exchange, throwing a high-level staffer under the bus in the process.

At issue was a sharp attack by Warren against Fed General Counsel Scott Alvarez regarding a swaps provision in the Dodd-Frank Act. In the exchange, Warren noted that Alvarez had recently stated that the central bank had concerns with a provision in the regulatory reform law that required banks to push out certain swaps activities into an affiliate.

Warren — furious that Congress mostly repealed the provision in December — repeatedly asked Yellen whether Alvarez's comments reflected the view of the board or if he was speaking out of turn.

"Do you think it's appropriate that Mr. Alvarez took public positions that do not evidently reflect the public position of the Fed's board?" Warren asked.

Yellen, who appeared uncomfortable and flustered by the exchange, didn't stick up for Alvarez but instead implied that he was not speaking for the central bank.

"The Fed's position and my position is that we're able to work very constructively within the framework of Dodd-Frank to tailor rules that are appropriate for the institutions we supervise, and we're not seeking to change the rules," Yellen said.

But here's the problem, both with Warren's original line of attack and with Yellen's response: Alvarez wasn't speaking out of turn. Senior Fed officials, including Yellen herself, were already on record as having concerns with the swaps push-out provision.

The remarks that set Warren off were made by Alvarez in November to the American Bar Association, when he said that "you can tell that" the swaps provision "was written at 2:30 in the morning and so that needs to be I think revisited just to make sense of it," according to a Politico report at the time.

Alvarez isn't being hyperbolic when he suggests that provision was written at 2:30 a.m. in the morning. The swaps provision was one of a handful of major measures in the Dodd-Frank Act that were negotiated during an all-night Congressional conference committee meeting just prior to passage of the regulatory reform law.

He's also not the first Fed official to suggest the provision had issues. Indeed, then-Fed Chairman Ben Bernanke went significantly further when the measure was first being discussed in May 2010. He sent a letter to Senate Banking Committee leaders objecting to the swaps push-out measure (part of Section 716 of the bill), arguing it would increase systemic risk.

"I am concerned that Section 716 in its present form would make the U.S. financial system less resilient and more susceptible to systemic risk and, thus, is inconsistent with the important goals of financial reform legislation," Bernanke said.

After the provision became law, Bernanke repeated his objections in 2013, saying that the provision was problematic.

"[Section] 716 requires the push-out of certain kinds of derivatives, which means the banks can't manage those derivatives, they have to be in a separate company, a separate affiliate," Bernanke said in testimony in February before the House Financial Services Committee. "And it's not evident why that makes the company as a whole safer. And what we do see is that it will likely increase costs of people who use the derivatives and make it more difficult for the bank to compete with foreign competitors who can provide a more complete set of services. So there are some concerns about that particular rule."

Moreover, Yellen herself expressed at least some discomfort with the swaps push out provision. During her confirmation hearing in November of 2013, she noted that "we're working very hard to address the concerns around the rule and we think that we're likely to be able to do so."

Yellen did say at the time that it wasn't necessary to repeal the rule — but Alvarez's comments aren't an endorsement of a repeal, either.

It's worth comparing and contrasting the statements made by Alvarez and Bernanke. Warren hammers Alvarez for saying 1) that the provision was negotiated in the dead of night (which it was) and 2) that the provision needs to be "revisited." But Bernanke had already said the provision increased systemic risk, raised costs without apparent benefit, and sparked Fed concerns. Seen in that light, Alvarez's comments were barely noteworthy, much less controversial. And they certainly weren't evidence of a rogue staffer within the Fed committed to the destruction of Dodd-Frank, as Warren seemed to suggest.

"The Fed is our first line of defense against another financial crisis, and the Fed's general counsel, or anyone at the Fed staff, should not be picking and choosing which rules to enforce based on their personal views," Warren said.

While Warren's attack may have been over the top, what's worse is that Yellen did nothing to defend herself, her staff or the institution she leads from it. After the hearing, she released a statement sticking up for Alvarez, saying, "My colleagues and I depend, with confidence, on Scott Alvarez' expert advice and counsel. He is a dedicated public servant who is committed to thoughtful public policy."

But during the hearing, Yellen said nothing of the kind, instead merely repeating the line that the Fed was not currently seeking a change to Dodd-Frank.

The fear is that in an era when Yellen and the Fed are facing attacks from all sides, including efforts to curb its independence, it's disheartening that the chairman was not more forceful in rebutting Warren. If such attacks on staff are allowed to go unanswered, it will only embolden Fed opponents further.