Readme.md from "master" branch as opposed to the default branch is displayed

Summary

We use "dev" as our default branch. I added a README.md file today, but it doesn't display on the project page. When I moved "master" to point to "dev", the readme showed up.

Steps to reproduce

  1. Create a new repo with "master" and "dev" branches.
  2. Set project default branch to "master"
  3. Add a README.md to "master" with contents (e.g. "This is the master repo")
  4. Add a README.md to "dev" with contents (e.g. "This is the dev repo")
  5. View the gitlabee project page and note that the "master" README.md is shown
  6. Change the project default branch to "dev"
  7. View the gitlabee project page and note that the "master" README.md is shown

Expected behavior

If "dev" is the default branch, you should see the README.md from "dev"

Actual behavior

You see the README.md from "master"

Relevant logs and/or screenshots

GitLab Enterprise Edition 8.11.3-ee gitlab-org/gitlab-ee@bb4a9e09d06dc4b0d5ec1f671b15b8ef734d4abe

Output of checks

Results of GitLab application Check

I don't have permissions to do this on our install.

Results of GitLab environment info

I don't have permissions to do this on our install.

Possible fixes

Unknown