diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 437ba38362c9de979e0185000abf777f5fb0ddce..b9b72dd7fa48a76f63238655c062a4fe8ace860e 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -360,7 +360,7 @@ class Updater extends BasicEmitter {
 		$disabledApps = [];
 		$appManager = \OC::$server->getAppManager();
 		foreach ($apps as $app) {
-			// check if the app is compatible with this version of ownCloud
+			// check if the app is compatible with this version of Nextcloud
 			$info = OC_App::getAppInfo($app);
 			if ($info === null || !OC_App::isAppCompatible($version, $info)) {
 				if ($appManager->isShipped($app)) {
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php
index 0b9ae8c8c5378064aefaa18c18106e455f9d6f15..fdbbb1be907231eb66a51cf0c8708e864ac8f19a 100644
--- a/lib/private/legacy/OC_App.php
+++ b/lib/private/legacy/OC_App.php
@@ -974,6 +974,15 @@ class OC_App {
 		\OC::$server->getAppManager()->clearAppsCache();
 		$appData = self::getAppInfo($appId);
 
+		$ignoreMaxApps = \OC::$server->getConfig()->getSystemValue('app_install_overwrite', []);
+		$ignoreMax = in_array($appId, $ignoreMaxApps, true);
+		\OC_App::checkAppDependencies(
+			\OC::$server->getConfig(),
+			\OC::$server->getL10N('core'),
+			$appData,
+			$ignoreMax
+		);
+
 		self::registerAutoloading($appId, $appPath, true);
 		self::executeRepairSteps($appId, $appData['repair-steps']['pre-migration']);