**Describe the bug**
MonetDB server crashes in `exp_setalias`.

**To Reproduce**
```sql
SELECT ( WITH x ( x ) AS ( SELECT 1 ) SELECT ( x ) FROM x WHERE ( SELECT x FROM x GROUP BY x + 1 , x ) );
```

**Backtrace of the Crash**
```c
#0 0x7febb81617ab (exp_setalias+0x2b)
#1 0x7febb81cce4c (rel_optimize_projections_+0xb1c)
#2 0x7febb817a33f (rel_visitor_topdown+0x27f)
#3 0x7febb817a6f5 (rel_visitor_topdown+0x635)
#4 0x7febb817a696 (rel_visitor_topdown+0x5d6)
#5 0x7febb817a6f5 (rel_visitor_topdown+0x635)
#6 0x7febb817a6f5 (rel_visitor_topdown+0x635)
#7 0x7febb817a696 (rel_visitor_topdown+0x5d6)
#8 0x7febb817a6f5 (rel_visitor_topdown+0x635)
#9 0x7febb81c6c4b (rel_optimize_projections+0x3b)
#10 0x7febb81a105a (rel_optimizer+0x75a)
#11 0x7febb81034a7 (sql_processrelation+0xc7)
#12 0x7febb7f0bedb (sql_symbol2relation+0x1bb)
#13 0x7febb7f38a82 (SQLparser+0x802)
#14 0x7febb7f37a0a (SQLengine_+0xa5a)
#15 0x7febb7f351fe (SQLengine+0x3e)
#16 0x7febb84b9b2f (runScenario+0x6f)
#17 0x7febb84bacfe (MSscheduleClient+0xb6e)
#18 0x7febb85fe6c2 (doChallenge+0x132)
#19 0x7febb941bb38 (thread_starter+0x318)
#20 0x7febb7e2c609 (start_thread+0xd9)
#21 0x7febb7d4f353 (clone+0x43)
```

**Software versions**
 - MonetDB version number: v11.49.1 (Dec2023)
 - OS and version: Ubuntu 20.04
 - From docker image monetdb/monetdb:Dec2023 (or monetdb/dev-builds:default)

An example of steps to reproduce in docker container (**write the poc into /tmp/test.sql first**):
```bash
docker container rm monetdb_test -f
docker run -e MDB_DB_ADMIN_PASS=monetdb --name monetdb_test -itd monetdb/monetdb:Dec2023
docker exec monetdb_test bash -c 'echo -n -e "user=monetdb\npassword=monetdb\n" > /root/.monetdb'

sleep 10
cat /tmp/test.sql | timeout 5s docker exec -i monetdb_test mclient monetdb     # run test case

if docker exec monetdb_test bash -c "grep '[m]server5' /proc/*/cmdline -lR"; then
    echo "[INFO] Server normal."
else
    echo "[CRASH] Mserver5 process does NOT exist."
fi
```

It can also be reproduced on the docker image `monetdb/dev-builds:default`.

**Issue labeling**
bug
MonetDB server crashes in `exp_setalias`
This is a GitHub Issue
repo:MonetDB
owner:MonetDB
Title : MonetDB server crashes in `exp_setalias`
Issue date:

--- start body ---
**Describe the bug**
MonetDB server crashes in `exp_setalias`.

**To Reproduce**
```sql
SELECT ( WITH x ( x ) AS ( SELECT 1 ) SELECT ( x ) FROM x WHERE ( SELECT x FROM x GROUP BY x + 1 , x ) );
```

**Backtrace of the Crash**
```c
#0 0x7febb81617ab (exp_setalias+0x2b)
#1 0x7febb81cce4c (rel_optimize_projections_+0xb1c)
#2 0x7febb817a33f (rel_visitor_topdown+0x27f)
#3 0x7febb817a6f5 (rel_visitor_topdown+0x635)
#4 0x7febb817a696 (rel_visitor_topdown+0x5d6)
#5 0x7febb817a6f5 (rel_visitor_topdown+0x635)
#6 0x7febb817a6f5 (rel_visitor_topdown+0x635)
#7 0x7febb817a696 (rel_visitor_topdown+0x5d6)
#8 0x7febb817a6f5 (rel_visitor_topdown+0x635)
#9 0x7febb81c6c4b (rel_optimize_projections+0x3b)
#10 0x7febb81a105a (rel_optimizer+0x75a)
#11 0x7febb81034a7 (sql_processrelation+0xc7)
#12 0x7febb7f0bedb (sql_symbol2relation+0x1bb)
#13 0x7febb7f38a82 (SQLparser+0x802)
#14 0x7febb7f37a0a (SQLengine_+0xa5a)
#15 0x7febb7f351fe (SQLengine+0x3e)
#16 0x7febb84b9b2f (runScenario+0x6f)
#17 0x7febb84bacfe (MSscheduleClient+0xb6e)
#18 0x7febb85fe6c2 (doChallenge+0x132)
#19 0x7febb941bb38 (thread_starter+0x318)
#20 0x7febb7e2c609 (start_thread+0xd9)
#21 0x7febb7d4f353 (clone+0x43)
```

**Software versions**
 - MonetDB version number: v11.49.1 (Dec2023)
 - OS and version: Ubuntu 20.04
 - From docker image monetdb/monetdb:Dec2023 (or monetdb/dev-builds:default)

An example of steps to reproduce in docker container (**write the poc into /tmp/test.sql first**):
```bash
docker container rm monetdb_test -f
docker run -e MDB_DB_ADMIN_PASS=monetdb --name monetdb_test -itd monetdb/monetdb:Dec2023
docker exec monetdb_test bash -c 'echo -n -e "user=monetdb\npassword=monetdb\n" > /root/.monetdb'

sleep 10
cat /tmp/test.sql | timeout 5s docker exec -i monetdb_test mclient monetdb     # run test case

if docker exec monetdb_test bash -c "grep '[m]server5' /proc/*/cmdline -lR"; then
    echo "[INFO] Server normal."
else
    echo "[CRASH] Mserver5 process does NOT exist."
fi
```

It can also be reproduced on the docker image `monetdb/dev-builds:default`.

**Issue labeling**
bug
--- end body ---

A crash in the MonetDB server occurs in the `exp_setalias` function when executing a specific SQL query that involves complex subqueries and aliasing. This indicates a potential vulnerability that could be exploited to cause a Denial of Service (DoS) by crashing the server.