m_trace: fix boundaries issue (CID#1108000, CID#1108001)