7365 merging scopes for where clauses