Ensure that the errorWrapper is closed when a new document is opened (issue 4625)
Merge pull request #4628 from Snuffleupagus/issue-4625

Ensure that the errorWrapper is closed when a new document is opened (issue 4625)