Implemented @WestLangley fix from #3582.