Fixed subtle bug with datastore scopes.