Make getStackMax return the correct maximal stack size