Fix MAGN-4451 strange behavior with Run Automatic and Revit Document close/reopen.
Merge pull request #2407 from ke-yu/RC0.7.2_Revit2015

Cherry-pick Randy's pull request 2354