Removing the use of:

beSubMatrixOfSizeOf(src, mask, size);
beSubMatrixOfSizeOf(src, mask);
as these do not create a sub-matrix but rather assemble a matrix.