Avoid infinite loops in dependencies and also load the models