Quick fix #31520. This issue is related to #31337. (cherry picked from commit c0b5a843badf7afa1f1aeb8f41cac87806ee188e)