I don't think it's an error. To find the rank of a matrix one has to perform some operations that involve subtraction of terms from different rows. This only makes sense if all the terms in the matrix are of the same type. The determinant works for your examp;les because items of different type are only multiplied together (which can make sense).
Alan