PackageConfig: Fix automatic component detection
Fix optional component handling