Fixed erroneous cycle detection when a dependency of a singleton throws an exception in its constructor.