Follow-up from "Optimize query for reference parser"
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Work on this issue](https://contributors.gitlab.com/manage-issue?action=work&projectId=278964&issueIid=331926)
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=331926)
</details>
<!--IssueSummary end-->
The following discussion from !62490 should be addressed:
> **question (non-blocking)**: Does the spec on line 39 have a similar problem? `avoids N+1 queries in #records_for_nodes`.
> You could move the N+1 spec improvements into a separate MR if you prefer.
The following discussion from !62490 should be addressed:
> **question**: I thought the N+1 queries spec would fail if the `includes(:project_feature, :group, :namespace)` is removed, but it doesn't. Is that expected?
We need to verify 'no project N+1 queries' test suite too. It has a N+1 problem for `can?(user, :read_merge_request_iid, object)` call.
```sql
SELECT MAX("project_authorizations"."access_level") AS maximum_access_level, "project_authorizations"."user_id" AS project_authorizations_user_id FROM "project_authorizations" WHERE "project_authorizations"."project_id" = 1 AND "project_authorizations"."user_id" = 1 GROUP BY "project_authorizations"."user_id" /*application:web,correlation_id:01F6MWKB6Q1N951ZHRP7SKG1R0,endpoint_id:Projects::BlobController#show,line:/app/models/project_team.rb:173:in `block in max_member_access_for_user_ids'*/
```
issue