Neaten the stack-dumping code.

  Which is now only enabled for debug-builds.