**Describe the bug**
Using `UPDATE` statement with `WHEN MATCHED THEN UPDATE` will cause mserver5 to crash with segmentation fault error. This happens only with latest version, v11.49.7, with v11.49.5 everything's good.

**To Reproduce**
1. Create database with this structure
```sql
CREATE TABLE logs (
	id int,
	activity varchar(255) NOT NULL
);
CREATE TABLE stats (
	activity varchar(255) NOT NULL,
	absolute_reworks int
);
```
2. Run this query, even with empty tables
```sql
WITH rework_stats AS (
SELECT
	activity,
	count(*) AS frequency
FROM (
	SELECT
		activity,
		count(*) AS reworks
	FROM
		logs
	GROUP BY
		activity
	HAVING
		count(*) > 1) AS case_reworks
GROUP BY
	activity) 
MERGE INTO
	stats
USING 
	rework_stats on
	rework_stats.activity = stats.activity
WHEN MATCHED THEN UPDATE
SET
	absolute_reworks = rework_stats.frequency
```

**Software versions**
 - MonetDB version number v11.49.7 (Dec2023-SP2)
 - OS and version: Ubuntu 22.04.4
 - From docker image using custom container `FROM ubuntu:jammy`

**Issue labeling**
bug

**Additional context**
```
# MonetDB 5 server v11.49.7 (Dec2023-SP2)
# Serving database 'test', using 12 threads
# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
# Found 15.499 GiB available main-memory of which we use 12.632 GiB
# Copyright (c) 2024 MonetDB Foundation, all rights reserved
# Visit https://www.monetdb.org/ for further information
# MonetDB/SQL module loaded
# Listening for connection requests on mapi:monetdb://0b11043ffe34:50000/
/opt/monetdb/monetdb-start.sh: line 18:     2 Segmentation fault      mserver5 --dbpath=/opt/dbfarm/test --set=merovingian_uri=mapi:monetdb://localhost:50000/test --set=mapi_listenaddr=0.0.0.0 -d10 --dbtrace=DEBUG
```

MonetDB server crashes using `WHEN MATCHED THEN UPDATE`
This is a GitHub Issue
repo:MonetDB
owner:MonetDB
Title : MonetDB server crashes using `WHEN MATCHED THEN UPDATE`
Issue date:

--- start body ---
**Describe the bug**
Using `UPDATE` statement with `WHEN MATCHED THEN UPDATE` will cause mserver5 to crash with segmentation fault error. This happens only with latest version, v11.49.7, with v11.49.5 everything's good.

**To Reproduce**
1. Create database with this structure
```sql
CREATE TABLE logs (
	id int,
	activity varchar(255) NOT NULL
);
CREATE TABLE stats (
	activity varchar(255) NOT NULL,
	absolute_reworks int
);
```
2. Run this query, even with empty tables
```sql
WITH rework_stats AS (
SELECT
	activity,
	count(*) AS frequency
FROM (
	SELECT
		activity,
		count(*) AS reworks
	FROM
		logs
	GROUP BY
		activity
	HAVING
		count(*) > 1) AS case_reworks
GROUP BY
	activity) 
MERGE INTO
	stats
USING 
	rework_stats on
	rework_stats.activity = stats.activity
WHEN MATCHED THEN UPDATE
SET
	absolute_reworks = rework_stats.frequency
```

**Software versions**
 - MonetDB version number v11.49.7 (Dec2023-SP2)
 - OS and version: Ubuntu 22.04.4
 - From docker image using custom container `FROM ubuntu:jammy`

**Issue labeling**
bug

**Additional context**
```
# MonetDB 5 server v11.49.7 (Dec2023-SP2)
# Serving database 'test', using 12 threads
# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
# Found 15.499 GiB available main-memory of which we use 12.632 GiB
# Copyright (c) 2024 MonetDB Foundation, all rights reserved
# Visit https://www.monetdb.org/ for further information
# MonetDB/SQL module loaded
# Listening for connection requests on mapi:monetdb://0b11043ffe34:50000/
/opt/monetdb/monetdb-start.sh: line 18:     2 Segmentation fault      mserver5 --dbpath=/opt/dbfarm/test --set=merovingian_uri=mapi:monetdb://localhost:50000/test --set=mapi_listenaddr=0.0.0.0 -d10 --dbtrace=DEBUG
```

--- end body ---

A segmentation fault in MonetDB v11.49.7 occurs when executing an UPDATE statement with the MERGE syntax, specifically using `WHEN MATCHED THEN UPDATE`. This indicates a potential vulnerability that could be exploited to cause a Denial of Service (DoS) by crashing the server.