The killer's moral code—only the unfaithful die—forces the detective to question his own definition of justice