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