I haven't been able to reduce this to a simple test case. There's a lot of context, some of which apparently contributes to this bug.
If I comment out the Assert() on Value.cc:58, my program proceeds without error with no apparent ill effects; I get a clean report from )CHECK. With the Assert() in place, I see this stack trace: ============================================================================== Assertion failed: containing_value == 0 in Function: set_containing_value in file: Value.cc:58 Call stack: ---------------------------------------- -- Stack trace at Value.cc:58 ---------------------------------------- 0x7fd7bc397d65 __libc_start_main 0x43ec25 main 0x55506d Workspace::immediate_execution(bool) 0x484182 Command::process_line() 0x479c55 Command::do_APL_expression(UCS_string&) 0x48dc95 Executable::execute_body() const 0x50aff0 StateIndicator::run() 0x4b9db3 Prefix::reduce_statements() 0x4b4f96 Prefix::reduce_A_B__() 0x54fbd4 Value::glue(Token&, Token&, Token&, char const*) 0x54f882 Value::glue_closed_closed(Token&, Value_P, Value_P, char const*) 0x4bb34e PointerCell::PointerCell(Value_P, Value&) 0x54cd0c 0x44cdc1 do_Assert(char const*, char const*, char const*, int) ======================================== SI stack: Depth: 8 Exec: 0x277b4e8 Safe ex: no Pmode: ∇ pkg⍙⍙apl_check[34] PC: 129 ( Stat: z←(pkg⍙loading_prefix '') pkg⍙invalid_assign ↑tokens err_code: 0x0 thrown: at StateIndicator.cc:40 e_msg_1: 'No Error' e_msg_2: '' e_msg_3: '' Depth: 7 Exec: 0x21f7218 Safe ex: no Pmode: ∇ pkg⍙import_apl[50] PC: 403 ( Stat: →(2 check_fn l)/assign_error err_code: 0x0 thrown: at StateIndicator.cc:40 e_msg_1: 'No Error' e_msg_2: '' e_msg_3: '' Depth: 6 Exec: 0x2427f58 Safe ex: no Pmode: ∇ pkg⍙load_one_package[10] PC: 39 'z← Stat: z←pkg⍙⍙apl_check pkg⍙import_apl fp err_code: 0x0 thrown: at StateIndicator.cc:40 e_msg_1: 'No Error' e_msg_2: '' e_msg_3: '' Depth: 5 Exec: 0x25bb548 Safe ex: no Pmode: ∇ pkg⍙load[14] PC: 70 'forms← Stat: forms←pkg⍙load_one_package¨⊃ppl err_code: 0x0 thrown: at StateIndicator.cc:40 e_msg_1: 'No Error' e_msg_2: '' e_msg_3: '' Depth: 4 Exec: 0x2368488 Safe ex: no Pmode: ∇ pkg⍙load_from_manifest[3] PC: 19 RETURN_VOID Stat: pkg⍙load¨pkg⍙read_manifest name err_code: 0x0 thrown: at StateIndicator.cc:40 e_msg_1: 'No Error' e_msg_2: '' e_msg_3: '' Depth: 3 Exec: 0x25b4af0 Safe ex: yes Pmode: ⍎ pkg⍙load_from_manifest'system-1' PC: 3 ============================================================================== Assertion failed: idx < items_valid in Function: operator[] in file: Simple_string.hh:136 Call stack: *** do_Assert() called recursively *** ==============================================================================