Fix the calling `merge` method at first in a scope
#25849

suginoy wants to merge suginoy:fix_merge_in_scope into rails:master

We do not currently have an analysis of these two commits