There's a bit of ambiguity there, though, at airspace transitions. 91.155 isn't particularly clear on that. I think you'd agree that the FAA's intent would not be for an airplane flying *closer* to clouds to be legal when flying farther from them is not. The extreme example would be an airplane flying right at 1200 AGL at the border between E and G (which 91.155(e) says means the plane is in G) and dragging its landing gear through the clouds but the cockpit in the clear. It would seem that the FAA would probably prefer that you continue to climb into the E-space at that point, provided the clouds don't go up at all.
Both the FAA and NTSB agreed in that case that it wasn't a 91.155(a) violation, which would seem to indicate the same.