Stream: Fix incorrect flag check in lw_stream_write
Stream: Prevent re-entrance to lwp_stream_write_queued