No, it does not override `err`. Look, we jump to `err_out_dlsym` if we got an error, and it's stored in `err`. Than, if and only if dlclose return something that is not zero (and we store that value in `dlclose_error`), we override `err`. Otherwise, we do nothing.
So, this behaviour is discussable, but I don't see here a bug that will lead to crash, only hiding original error on dlclose failure.