test case for bug-3598580: Tcl_ListObjReplace may release deleted elements too early