Improve performance when using debug_backtrace. (see #1)