Backport #3936 to the `5.11.x` branch: - [x] backport code changes (40bc1c4146d91b595668bd06402dba0a83d05b9f and 044f5cf4b066d3f2121a33db4a8d3952355d5225?) - [x] move release notes entry to appropriate file(s) - [x] backport release notes