fix breakage when ast_copy_string is used to copy substrings (bug #4146, but a differ...