Fix MAGN-4451 strange behavior with Run Automatic and Revit Document close/reopen.
Merge pull request #2354 from Randy-Ma/magn-4451

Fix MAGN-4451 strange behavior with Run Automatic and Revit Document close/reopen.