Fixed #20167 -- Preserve the traceback of `ImportError`s in `import_by_path`.

Thanks @carljm for the review.