(cherry picked from commit 76650af9fdc7ef06d13ce252986d21574903d293) Closes #10231
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>