Serial.flush() missing last byte (Arduino Due)

I read that this issue was fixed with the 1.0.3 release, however I am now using the new Arduino Due with the 1.5.2 IDE and I am having the same old problem of Serial.flush() not waiting long enough such that when I disable the TX on my RS-485 transceiver the last byte has not yet made it through. Anyone else have this problem with the Due? Any suggested fixes?

          digitalWrite (pinTX_ENABLE, HIGH);  // Enable transmit mode on RS-485 transceiver

          Serial1.write(buffer, L); // write byte buffer of length L to RS-485 DI
          Serial1.flush(); // wait until write complete
          
          digitalWrite (pinTX_ENABLE, LOW);  // Disable transmit mode on RS-485 transceiver

Thanks!

Change the following line in USARTClass.cpp (method flush(), line 107 in IDE 1.5.2)

  while ((_pUsart->US_CSR & US_CSR_TXRDY) != US_CSR_TXRDY)

to

  while ((_pUsart->US_CSR & US_CSR_TXEMTPY) != US_CSR_TXEMPTY)

This is according to the datasheet and untested but I guess, it's worth a try.