diff --git a/git_deploy.module b/git_deploy.module
--- a/git_deploy.module
+++ b/git_deploy.module
@@ -21,26 +21,30 @@ function git_deploy_system_info_alter(array &$info, Extension $file, $type) {
   // Use drupal_static() so we can free up memory from static variables later.
   $projects = &drupal_static(__FUNCTION__ . ':projects', []);
   $available = &drupal_static(__FUNCTION__ . ':available');
   $update = &drupal_static(__FUNCTION__ . ':update', []);
+  // The dynamic "origin" property is not set on Theme objects because
+  // ThemeExtensionList::subClassExtension() re-instantiates them. Fall back to
+  // the extension path so core themes are still detected as core.
+  $origin = $file->origin ?? (str_starts_with($file->getPath(), 'core/') ? 'core' : '');
   // Core has hard-coded version numbers, so we need to verify them. Otherwise,
   // a valid version number indicates that this project was not installed with
   // Git.
-  if (empty($info['hidden']) && (empty($info['version']) || ($file->origin == 'core' ? strstr($info['version'], '-dev') == '-dev' : $info['version'] == \Drupal::VERSION || !preg_match('/^\d\..+\..+/', $info['version'])))) {
+  if (empty($info['hidden']) && (empty($info['version']) || ($origin == 'core' ? strstr($info['version'], '-dev') == '-dev' : $info['version'] == \Drupal::VERSION || !preg_match('/^\d\..+\..+/', $info['version'])))) {
     // Work around bug that causes Git to fail for users without home directory.
     $home = getenv('HOME') === FALSE ? 'HOME=' . DRUPAL_ROOT . ' ' : '';
     // Verify that we are in a Git repository. For core, also verify that this
     // is really a Drupal repository.
     $directory = exec($home . 'git -C ' . escapeshellarg($file->getPath()) . ' rev-parse --show-toplevel 2> ' . GIT_DEPLOY_ERROR_DUMP);
-    if (!empty($directory) && ($file->origin != 'core' || in_array($directory, [DRUPAL_ROOT, DRUPAL_ROOT . '/core']))) {
+    if (!empty($directory) && ($origin != 'core' || in_array($directory, [DRUPAL_ROOT, DRUPAL_ROOT . '/core']))) {
       // Only check Git once per repository.
       if (!isset($projects[$directory])) {
         $projects[$directory] = [];
         // Make sure Git operates in the right directory.
         $git = $home . 'git -C ' . escapeshellarg($directory);
         // Ensure file is in repository.
         if (exec("$git ls-files " . escapeshellarg(str_replace("$directory/", '', realpath($file->getPathname()))) . ' 2> ' . GIT_DEPLOY_ERROR_DUMP)) {
           // Get upstream info.
-          $upstream = _git_deploy_get_upstream($git, $file->origin == 'core' ? ['8.*', '9.*', '10.*', '11.*'] : ['*.*']);
-          if ($file->origin == 'core') {
+          $upstream = _git_deploy_get_upstream($git, $origin == 'core' ? ['8.*', '9.*', '10.*', '11.*'] : ['*.*']);
+          if ($origin == 'core') {
             $project_name = 'drupal';
           }
