Now generates proper object for extra scopes
Fixed index lookup for brackets.