Ensure correct dependency loading order