Follow-up from "Fix performance problem of tags query"
<!--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>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=23238)
</details>
<!--IssueSummary end-->
The following discussion from gitlab-ce!20555 should be addressed:
- [ ] @grzesiek started a [discussion](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20555#note_87359310): (+8 comments)
> Is that going to reduce a number of queries by one? I wonder how can we describe this change in a unit test. Perhaps we don't need one, but we should at least consider adding a test to prevent this from happening in the future.
Related to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20555
issue