Simplify check_merge to avoid creating a new query