Fixed duplicate results in search.

This fixes issue #1691

- Checking if the dict already contains the node.

![image](https://f.cloud.github.com/assets/1102381/2380559/52ff6fc6-a8ad-11e3-93a1-acb88d332964.png)