I attempted to reproduce the error. The closest error I could reproduce is slightly different than my original email suggests.
The problem I reproduced below is an undefined variable. To the best of my recollection, the original error was silent whereas this error, posted below, is "unbound variable". This may lead to a "behaves as expected" resolution.
> can you post your actual script?
#!/usr/bin/env bash
set -u
readonly -a ARGS=("${@}")
echo 'ARGS is:'
echo "${ARGS[*]}"
Running without arguments causes the error
$ ./test.sh a
ARGS is:
a
$ echo $?
0
$ ./test.sh
ARGS is:
./test55.sh: line 7: ARGS[*]: unbound variable
$ echo $?
1