An alternate rank function for MathObject matrices is available in the following GitHub issue, as well as revised basis grading code which uses it:
I've been using the new code in production courses, but more help in testing it would be nice, so it can be debugged/stabilized for addition to the main WeBWorK pg repository for a future release.