Implement workaround for lack of check_finite keyword in older cholesky.