`extends` appears to be broken when used with `gitlab-runner exec`

Summary

Steps to reproduce

$ mkdir tmp
$ cd tmp
$ git init
  # create initial comimt
$ echo hello > test
$ git add test
$ git commit -m 'initial commit'
  # create gitlab-ci.yml
$ cat >.gitlab-ci.yml <<EOF
.validate-base:
  script:
    - echo hello

validate:
  extends: .validate-base
  before_script:
    - echo test
EOF
$ git add .gitlab-ci.yml
$ git commit -a
$ gitlab-runner exec shell validate
FATAL: missing 'script' for job                    

Actual behavior

It fails claiming the job is missing a script.

Expected behavior

The job should run.

Used GitLab Runner version

$ gitlab-runner --version
Version:      11.4.2
Git revision: cf91d5e1
Git branch:   11-4-stable
GO version:   go1.8.7
Built:        2018-10-26T20:48:10+0000
OS/Arch:      linux/amd64
Edited by Ben Gamari