r18787: Fix the strlen_m and strlen_m_term code by merging