Reland "Clean up `StackOverflowError` construction."

This reverts commit 3e1b1f8ff913d2fb811e3fe5714552fc98000d15.

Bug: 253570082

Reason for revert: Not the culprit after all

Change-Id: I5846fb3695880ffbf373858afae688c82f7a5c92
3 files changed