In practice however, it seems that this bug never hits, because B and C always have the same number of rows when the MEX is called.