Fix MAGN-3799 Revit 2015 crash switching documents.
Merge pull request #2247 from Randy-Ma/magn-3799

Fix MAGN-3799 Revit 2015 crash switching documents.