remove set -u

set -u prevents the creation of an empty array spdefs=(), but spdefs= makes for inconsistent array elements.