CI/CD variable of type "file" do not resolve to file names when referenced within global variable declarations

Summary

CI/CD variables of type "file" do not resolve to file names when referenced within global variable declarations

Steps to reproduce

Define a CI/CD variable of type "file" in the project, e. g. FILE V1 SOME_VALUE.

In .gitlab-ci.yml use the variable in two places: Within a global variable's definition, and within a script.

variables:
  V2: "$V1"

build:
  script:
    - 'echo $V1'
    - 'echo $V2'

Example Project

https://gitlab.com/mkarg/gitlabbugresolvefilevariable

What is the current bug behavior?

While echo $V1 correctly prints the file name, echo $V2 incorrectly prints the file content.

What is the expected correct behavior?

echo $V1 and echo $V2 should both print the file name but never the file content.

Relevant logs and/or screenshots

$ echo $V1
/builds/mkarg/gitlabbugresolvefilevariable.tmp/V1
$ echo $V2

SOME_VALUE