Support multiple nested yaml anchors in before_script

In .gitlab-ci.yml, script seems to support multiple levels of nested arrays, while before_script only accepts a maximum of two levels. This can lead to problems when using YAML anchors.

Example:

.a1: &a1
    - foo

.a2: &a2
    - *a1
    - bar

job1:
    before_script:
        - *a2    # does work with *a1 but not with *a2
        - before
    script:
        - *a2    # does work with *a1 and *a2
        - run test
Edited by 🤖 GitLab Bot 🤖