State court ruling deals blow to U.S. bank mortgage system