fixed issue #879, unloading of circular dependencies in AssetManager would go into infinite recursion