Remove unnecessary use of unique_ptr::release() used to construct another unique_ptr.