Copy of !1290 for master
As requested, a copy of !1290 (merged) cherry-picked onto 'master'. I only tested that it builds. Since surrounding code is intact, I do not expect any problems.
As requested, a copy of !1290 (merged) cherry-picked onto 'master'. I only tested that it builds. Since surrounding code is intact, I do not expect any problems.