[DependencyInjection] Added exception to avoid fatal during compile in a frozen dumped container