New code for issue #18669