Fixing test-memory after sexp.c refactoring and improved stack traces.