Include inputs are not passed to including template while using wildcards

Using wildcards in include path does not pass the defined inputs to sub-templates.

Example

spec:
    inputs:
        testDir:
            type: string
            default: .gitlab-ci
---
include:
    -   local: $[[ inputs.testDir ]]/someFiles/*.yml
        inputs:
            test: 123

Child templates in folder someFiles cannot fetch inputs variable.

Expected

Using wildcards should pass all inputs to every included file.

See also: #582907 #582908 #582912 #582913

Edited by 🤖 GitLab Bot 🤖