Revert "Merge pull request #16287 from EragonJ/bug-971565"

This reverts commit f5de3036859c58eed929e3d488ef0c594176a5b2, reversing
changes made to 4606c99d4a3f4b95f26e726b2efc5e57089147f3.