The Greek debt crisis is like an onion. Peel away one layer and you find another—and then you cry.

Remember last week? The big test was two votes by the Greek Parliament on a new austerity package.

Pass that, the Greeks had been told by the IMF, the EU, and the European Central Bank, or we won’t give you the $17 billion you need to avoid defaulting on your government debt in August. So the Greeks voted to cut their budget, raise taxes, and sell off government assets.

But that only moves the crisis from worry over a default in August to worry over a default in, well, July.

Eurozone leaders are supposed to be putting together a second rescue package for Greece, with a vote on the package around July 11. A second package is necessary because the first rescue package, passed last year, was designed only to get Greece to 2012.

The hope was that Greece, by that time, would be able to access the financial markets for its debt financing needs. That turned out to be overly optimistic—and now the Eurozone is trying to put together a new package that would take Greece to 2013 or 2014.

Germany has been insisting that the second package include some kind of haircut for current Greek bondholders, so they would share the pain of taxpayers who would be asked to dig deep into their pockets to fund a new package.

The ECB, as well as the big ratings companies such as Standard & Poor’s, balked at anything that required mandatory participation. S&P, Moody’s, and Fitch Ratings all said that mandatory participation would trigger a default rating on Greek debt.

The French then leaped into the gap with a complex proposal that included a voluntary rollover of maturing Greek debt into new, longer-term Greek bonds. As we headed into the Fourth of July weekend, that seemed a likely compromise formula.

But today, Standard & Poor’s threw a spanner into the wheels. Even the French voluntary plan, the ratings company said, would trigger a default rating on Greek debt.

That would seem to be a huge problem, since the ECB, which has lent $140 billion to Greek banks with Greek government debt as collateral, would seem to be unable to accept Greek debt with a default rating as collateral for lending Greek banks the money they need to stay liquid.

That could trigger a run on Greek banks, the collapse of the Greek banking system—and then, potentially, runs on banks in Portugal, Ireland, and other Eurozone countries.

But there might be an out.

Turns out that the bankers who run the ECB are willing to get very creative when it comes to interpreting their own rules. First, outgoing bank president Jean-Claude Trichet said today that the bank would continue to accept Greek sovereign debt as collateral for loans to Greek banks, as long as one ratings company didn’t grade Greek with “default.”

At the moment, Standard & Poor’s and Fitch have both said that the French plan would trigger a default rating, but Moody’s has not given an opinion.

The bank isn’t willing to rely on just that very thin reed. The ECB could continue to accept Greek government debt as collateral even after a default rating—if the default rating seemed likely to be in effect for just a short term.

Both Fitch and Standard & Poor’s have indicated that they would be likely to remove the default rating if Greece is able to make its interest payments after the implementation of the rollover plan that had triggered the default rating.

The precedent that everybody is pointing to this morning is Uruguay’s default in 2003. S&P cut its rating to selective default on May 16, 2003, and then lifted that rating to B- on June 2. Uruguay had arranged a debt swap with bondholders on May 16, the day of the default rating.

The mess has sent everyone back to the ECB rulebook, which says the bank “may be warranted” in rejecting defaulted bonds as collateral.

See, those looking for a way out have said, the rules don’t say the bank absolutely can’t accepted defaulted bonds.

If you think that’s tortured logic, I’d certainly agree. But when you’re trying to avoid the meltdown of an entire banking system, what’s a little bit of creative reading?

Full disclosure: I don’t own shares of any of the companies mentioned in this column in my personal portfolio. The mutual fund I manage, Jubak Global Equity Fund (JUBAX), may or may not now own positions in any stock mentioned in this column. For a full list of the stocks in the fund as of the end of March, see the fund’s portfolio here.