Correct bug when registering new graph using API.

This is happening using the pre-evict mode, graph is unregistered
before checking if it already exists. So the pre-existing check was
useless.