I have some code that was "evolved" rather than designed and is admittedly a bit of a mess and I needed to add an "(exit)" deep in a block where running a sub process has failed. However the (exit) never exits. This is true both if I run compiled or interpreted. I have tried to make a small test case but I can't reproduce the issue. I even replaced the (exit) with a call to a function that prints a message and then does exit and it still doesn't exit. I also tried _exit with the same result.
Any suggestions on what to look at or how to debug this?
My attempt to reproduce (which works fine) is below: