Issue #18408: Fix list_ass_slice(), handle list_resize() failure

I tested the patch manually by injecting a fault using gdb: list items are
correctly restored on failure.
1 file changed