getTopLevelScope

Walks up the parent scopes to the global object.