fix: allow cycles in module dependencies

Although hardly a good practice it might happen that we can have
cycles in module dependencies. Node.js is handling this situation
as described here: http://nodejs.org/api/modules.html#modules_cycles
The simple fix from this commit allows similar behavior.