gh-159739: Preserve the syntax error if metadata allocation fails (#159751) Restore the original exception when optional syntax-error metadata cannot be allocated.