this change prevents errors from being automatically cleared once they are read. A new flag `-flush` is introduced to flush errors on read if necessary.
This is a temporary mitigation for the issue described in #3065.
The intent is to merge this, cut a 4.6.1 release, and then come up with
a more comprehensive solution for 4.7.0.