One more temporary fix of linalg test errors.

To fix #5730