coding in CUE (or a verison of it, with the following schema) why can't i add two lines inside each loop and what are some alternatives to do so?

This code fails:
"1700_-_Rte_-_TTTech_Rte": {
                        uri: "mxml:1700_-_Rte_-_TTTech_Rte"
                        visibility: "none"
                        artifacts: [
                            for hostname, shortname in hostgroup if shortname =~ "SH[0-9]+" {
                                system.ecus[ECU].hosts[hostname].artifacts."rte_const_c_common",
                                system.ecus[ECU].hosts[hostname].artifacts."rte_const_h_common",
                            }
                            for hostname, shortname in hostgroup if shortname =~ "PH[0-9]+" &&
                            system.ecus[ECU].hosts[hostname].build_caps["BC_CLASSIC_PLATFORM"] != _|_ {
                                if system.ecus[ECU].hosts[hostname].build_caps["BC_CLASSIC_PLATFORM"] {
                                    system.ecus[ECU].hosts[hostname].artifacts."rte_const_c_common",
                                    system.ecus[ECU].hosts[hostname].artifacts."rte_const_h_common",
                                }
                            }]}

<schema>
#system: {
    build_config: #build_config
    general_config: {
        config_locations: [string]: string
        global_constants: [string]: string
    }
    services: [Name=string]: {id: Name} & #service
    networks: [Name=string]: {id: Name} & #network
    bytes_alignment: *4 | 8
    ecus: [Name=string]: {id: Name} & #ecu
    configs: [Name=string]: {id: Name} & #config
    artifacts: [Name=string]: {id: Name} & #artifact
    associations?: [...#association]
}
#build_config: {
    build_caps: [string]: true
    build_types: [string]: true
    deliver_as_binary: [...string]
    deliver_as_source: [...string]
}
#compiler_config: {
    name: string
    compiler: string
    os: "Classic Platform" | "QNX" | "Linux"
    os_family: "Autosar" | "POSIX"
    host_repo?: string
    build_options: [Key=string]: {id: Key} & #build_config_option
}
#build_config_option: {
    id: string
    condition: string | *""
    overwrite: *false | true
    conan_profile: string | *"default"
    build_caps?: [string]: true
    defines?: [...string]
    cflags?: [...string]
    lflags?: [...string]
    syslibs?: [...string]
    justification: string | *"Unjustified"
}
#service: {
    id: string
    description: string | *""
    input_arxml_files: [#arxml_kind]: string | [...string] | #artifact
    build_cap_conditions: [string]: true
    configs: [Name=string]: {id: Name} & #config
    swcs: [Name=string]: {id: Name} & #swc
    hosts: [Name=string]: {id: Name} & #host
    association: #association
}
#network: {
    id: string
    network_interfaces: [...#network_interface]
    network_characteristics?: {
        network_strength: int | *0
        ttethernet_network_characteristics?: {
            rate_constrained: {
                bandwidth_allocation_gap: =~ "[0-9]{1,2}%" | *"0%"
                rc_traffic_only: bool | *false
                jitter: #time_unit
            }
            debug_traffic_marker?: #hex_ip_address
            vlan_tag_size_in_bytes: int | *0
            mwtlif_mtu_size: int | *0
        }
        hssl_network_characteristics?: null
        end2end_propagation_delays?: [string]: {
            hostA: #host
            hostB: #host
            delay: #time_unit
        }
    }
    network_links: [string]: {
        interfaceA: #network_interface
        interfaceB: #network_interface
    }
}
#config: {
    id: string
    kind?: string
    description: string | *""
    external_csv_file?: {
        path: string | *""
        schema?: string
        info?: string | *""
    }
    external_custom_file?: {
        path: string | *""
        parser?: string
    }
    external_xml_file?: {
        path: string | #artifact | *""
        schema?: string
        info?: string | *""
    }
    external_json_file?: {
        path: string | #artifact | *""
        schema?: string
        info?: string | *""
    }
    inline_record?: #inline_record
    custom?: _
}
#inline_record: [Key=string]: *{
    key: Key
    value?: string
    text?: string
} | [...{key: Key, value?: string, text?: string}]
#location: {
    path: string
    pattern: string | *"*.*"
}
#artifact: {
    id: string
    uri: string
    kind: *"plain" | "target"
    locations: [...#location]
    exclude_locations: [...#location]
    visibility: *"internal" | "customer"| "none"
    artifacts: [...#artifact]
    customer_exposure?: "input" | "output"
    rp_destination?: string
}
</schema>