modules/m_capab: Port m_capab segfault patch from Charybdis