Revert "Merge pull request #5507 in develop"

This reverts commit 87531698e7ef1cf3f6994cc8b8e35eb77c9636c0, reversing
changes made to f976d54b423ca669e906a09e019ae2979ac007b4.