issue #21672: More refactoring.