Filter duplicates solutions

TODO: Transform this into an effective pruning to avoid useless
expression generation