You can try to reproduce it by uploading a document file that is above the max limit. Then after that upload a pdf file.
Is there a way to refresh the control via javascript? If I refresh the page after the warning message for max file size appears, the error does not occur.