trace: better use of stack_trace_enabled for boot up code