Fix check for global scope
Merge pull request #3079 from junmendoza/Revit2015

Cross merge to Revit2015