Revert "Merge pull request #17116 from pivanov/bug-968483"

This reverts commit 5024a949f5a63dac3abf769264077191d9436010, reversing
changes made to 6f49249b429095064df345c9b24c00f4d7960972.