Properly resolve cyclic dependencies.