Revert "Merge branch 'bugfix-11678' into release-6.5.2"

This reverts commit 76587df84457e5f79dd9df4482929bfbe19aa77b, reversing
changes made to 12565c29d5d92b83da296a7b7a5a05b0f54315cd.