Use determinant to check invertibility (#678)