Avoid double finalize

Transports must always set their globals to NULL at the end
of finalize() and check for NULL when entering finalize().