throw error on circular dependencies