issue #22669: A little refactor.