Fixes a long-standing bug with sol_list_slice.