Issue #21868: Prevent turtle crash due to invalid undo buffer size.
merge