Double free: Improved handling of noreturn functions. Partial revert of previous fix.