Fix circular dependency issue

Test is in a separate commit in case someone finds a better fix.
This fix adds a `_resolving` flag to break a dependency circle.
More on this in [component google group][1]

[1]: https://groups.google.com/d/msg/componentjs/FTYUmzG3zdc/saKET6zmxfwJ