Anonymity problem after voting with blind signatures In a distributed voting system (all the messages are public, but signed and maybe encrypted/blinded), having: 


$d$, $e$, $N$ — registrar key params  
$m$ — msg  
$r$ — random blinding factor  
$m'$ — blinded msg  
$sm'$ — signed blinded msg  
$sm$ — signed msg


When person received $sm'$ from the registrar, and unblinds it — he receives $sm$. He then sends it to the system anonymously for counting.

So, at the end registrar will have $sm$, and can read $m$.

Finally the problem

Registrar can in cycle try to do $sm'_i \cdot sm_j^{-1} \pmod N$ to find some $r_k$.
Then compare $m \cdot r_k^e \pmod N$ with with every $m'$.
If values match — person which sent $m'$ can be deanonimized as it is not hard for registrar to keep information about all $m'$ and linked persons.

It will take some time to process all the combination and depends of number of voters, but it works (tested simplest scenario).

Is there any mistake, or is it possible to overcome this problem with some trick?
The problem is, that you are actually checking a tautology and this is no danger to deanonymization. Let me explain it to you with a simple example of 2 signatures:

Lets say we want to blindly sign distinct messages $m_1$ and $m_2$ with distinct randomness $r_1$ and $r_2$.

Now during the blind signing you produce the transcripts (I omit $\mod N$):

$m_1'=r_1^e m_1$, $sm_1=r_1 m_1^d$ and 
$m_2'=r_2^e m_2$, $sm_2=r_2 m_2^d$ 

and the final message signature 
pairs are $(m_1,sm_1=m_1^d)$ and $(m_2,sm_2=m_2^d)$.

Now, lets apply your strategy:

lets look at one case where you start from one of the final signatures, say $(m_1,sm_1)$ and check it against both transcripts of the blind signing process  (and the second case is analogous due to symmetry):

$sm_1' sm_1^{-1}= (m_1^d r_1) (m_1^d)^{-1} = r_1$ and 

$sm_2' sm_1^{-1}= (m_2^d r_2) (m_1^d)^{-1} = r_1'$

now you have two candidates and lets check it with every $m_i'$:

$r_1^e m_1 = r_1^e m_1 = m_1'$ and
$(r_1')^e m_1 = ((m_2^d r_2) (m_1^d)^{-1})^e m_1 = (m_2^d)^e r_2^e (m_1^{-1})^{ed} m_1 = r_2^e m_2 = m_2'$

So, now you have checked all transcripts of the blind signing process against the signature of the first message and with your candidates you have found out 
that the first message corresponds to both transcripts with exactly the same probability. So you have learned nothing. As said above, the 
same argument (due to symmetry) applies to the other case and you can easily generalise this to more messages.