Backportet m_repeat from 2.2