This method should detect circular dependency. It is similar to `View::registerAssetBundle()`.