tests:Produce sorted policy with unique rules only

Hi,
I've just noticed a bug on my scipt I made during rebasing and refactoring that caused the sorted policy to have redundant rules.
The idea was, that "sorted" policy has no redundancy (no merges). 
Please, pull this patch also.

Best regards,
Jan Cybulski