Credit-market algorithms may violate anti-discrimination laws even when they’re designed not to. A Stanford researcher looks for a fix.