Modified test for matrix inverse exception throw