Gitlab CI pre-filled inputs or variables in conditional includes don't show up correctly
<!--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=356060)
</details>
<!--IssueSummary end-->
### Summary
Having pre-filled variables defined in a file included with a `rules` section do not show up properly in the UI when clicking "Run pipeline"
### Steps to reproduce
- Create a file `test.yaml` with the following content
```yaml
variables:
TEST_VAR:
value: "Hello"
description: "This is a test"
```
- Create a file `test2.yaml` with the following content
```yaml
variables:
TEST_VAR2:
value: "World"
description: "This is a test"
```
- In the `.gitlab-ci.yml` file
```yaml
include:
- local: /test.yml
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
- local: /test2.yml
rules:
- if: '$CI_COMMIT_BRANCH != "main"'
test:
script:
- echo "TEST_VAR = $TEST_VAR"
- echo "TEST_VAR2 = $TEST_VAR2"
```
- Proceed to run a pipeline from the UI
### Example Project
https://gitlab.com/zupalex/demo-conditional-include-problem
### What is the current *bug* behavior?
When running a pipeline from the web UI, `TEST_VAR` does not appear in the list of pre-filled variables when having the `main` branch selected but `TEST_VAR2` does appear. However, when running the pipeline, `TEST_VAR` is properly printed as "Hello".
### What is the expected *correct* behavior?
When running a pipeline from the web UI, `TEST_VAR` should appear in the list of pre-filled variables while `TEST-VAR2` should not.
issue