os: dissolve contexts in Packet_stream

Fixes #1003.