This reverts commit ad96887a. Commit adb8688b alone should be enough to fix issue #9754. Fixes #11269 (cherry picked from commit c0f34168)