This reverts commit ad96887a. Commit adb8688b alone should be enough to fix issue #9754. Fixes #11269
mentioned in commit f02b5472