Fixed issue when limit_scopes_to_grants was set to true the $result->id would get overridden by oauth_grants.id