Fixes #83451 and #83957.
Merge pull request #168 from luisromangz/8.5-SNAPSHOT-83541

Fixes #83451 and #83957.