(cherry picked from commit 9bc5e07a)
Closes #3336312
The PR shows quite a lot of file changes which are not relevant