issue #19814: Various bug fixes.