Fix a reference-before-assignment that happened to to an exception.