Merge "hal: fix direct output flag test in open_output_stream"