fix #1058 pipe_t needs to take ownership of metadata