Detect component loops