The internal _IO_stdin_ variable is not updated when the application assigns to stdin, which is a GNU extension.