Issue #24381: merge from 3.5