Indeed, with a high stack size, the memory allocated to each thread will be higher. Thus the number of threads is limited.
It is preferable to avoid increasing this parameter.
We opened bug#1443 in order to set STAMBIA_STACK_SIZE to 256k in initvariables.sh, in order to reflect initvariables.bat.
The fix will appear in the CHANGELOG when it is fixed.