Invert modules ids.