Remove some code that was kept for retro-compatibility while merging task 1827950 in 11.0 (stable) Task #1838048 PR #24425