core: debug: make stack size check more sensible