Properly handle circular dependency errors