The case goes into discussing this directly, indicating that Google's cleanroom efforts give it evidence that it proceeded in good faith, but good faith alone does not intrinsically absolve you of admitted copying (which is an infringement) that's found elsewhere.
Now if you did an ACTUAL cleanroom and didn't take chunks that you thought were trivial, the argument to demonstrate infringement in the first place would need to be localized on the SSO level, where single-option design choices would again be exempted through the doctrine of merger, and we'd have a much different set of considerations.
As per the jury award to Oracle, you'll be happy to know they're going back to first instance to have another trial to determine the quantum. Maybe Oracle will get $1 again despite winning due precisely to the mitigating factors you've raised. Who knows. This case wasn't about that. It was about fair use.