Finish reverting #b73cddc
Merge pull request #7119 from jjshoe/patch-4

Finish reverting a broken commit in #5679