Move #ifdef DETAIL_TRACE to avoid a tiny bit of wasted work.