Issue #3027240: initial commit with changes from original MR 1300 for 9.x branch 3027240-undefined_parents
Closes #3027240