POSIX states that if optional_actions includes the TCSAFLUSH flag "the change shall occur after all output written to fildes is transmitted, and all input so far received but not read shall be discarded before the change is made." Current kernel behavior flushes (discards) output when you call tcsetattr.
Created attachment 79384 [details] patch to correct behavior
this was integrated in Update 2