Revert "Merge pull request #13276 from gasolin/issue-919927"

This reverts commit 5289b66509338239e338851a0258fc4e16a028d2, reversing
changes made to c5d7216e9fb2c1375096bac7e0cca76efab70bfd.

This caused bug 935557