This NPE issue is different from #99477 and #99516

### CI Link

https://gradle-enterprise.elastic.co/s/v7icocftg32uc/tests/task/:server:internalClusterTest/details/org.elasticsearch.snapshots.SnapshotStressTestsIT/testRandomActivities%20%7Bseed=%5B32DA52B8E1546052:7737AEA21D8C5249%5D%7D?top-execution=1

### Repro line

./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.snapshots.SnapshotStressTestsIT.testRandomActivities {seed=[32DA52B8E1546052:7737AEA21D8C5249]}" -Dtests.seed=32DA52B8E1546052 -Dtests.locale=cs -Dtests.timezone=America/El_Salvador -Druntime.java=21

### Does it reproduce?

No

### Applicable branches

main

### Failure history

https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.snapshots.SnapshotStressTestsIT&tests.test=testRandomActivities%20%7Bseed%3D%5B32DA52B8E1546052:7737AEA21D8C5249%5D%7D

### Failure excerpt

```
WARNING: Uncaught exception in thread: Thread[#108,elasticsearch[node_s0][masterService#updateTask][T#1],5,TGRP-SnapshotStressTestsIT]
java.lang.AssertionError: java.lang.AssertionError: java.lang.NullPointerException: Cannot invoke "org.elasticsearch.cluster.SnapshotsInProgress$Entry.failure()" because "entry" is null
	at __randomizedtesting.SeedInfo.seed([32DA52B8E1546052]:0)
	at org.elasticsearch.snapshots.SnapshotsService.finalizeSnapshotEntry(SnapshotsService.java:1447)
	at org.elasticsearch.snapshots.SnapshotsService.runNextQueuedOperation(SnapshotsService.java:1535)
	at org.elasticsearch.snapshots.SnapshotsService.lambda$finalizeSnapshotEntry$28(SnapshotsService.java:1428)
	at org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:177)
	at org.elasticsearch.repositories.FinalizeSnapshotContext.onResponse(FinalizeSnapshotContext.java:116)
	at org.elasticsearch.repositories.FinalizeSnapshotContext.onResponse(FinalizeSnapshotContext.java:28)
	at org.elasticsearch.action.ActionListenerImplementations$DelegatingResponseActionListener.onResponse(ActionListenerImplementations.java:182)
	at org.elasticsearch.action.support.SubscribableListener$SuccessResult.complete(SubscribableListener.java:310)
	at org.elasticsearch.action.support.SubscribableListener.tryComplete(SubscribableListener.java:230)
	at org.elasticsearch.action.support.SubscribableListener.setResult(SubscribableListener.java:259)
	at org.elasticsearch.action.support.SubscribableListener.onResponse(SubscribableListener.java:173)
	at org.elasticsearch.repositories.blobstore.BlobStoreRepository.lambda$finalizeSnapshot$19(BlobStoreRepository.java:1684)
	at org.elasticsearch.action.ActionListenerImplementations$ResponseWrappingActionListener.onResponse(ActionListenerImplementations.java:236)
	at org.elasticsearch.action.support.SubscribableListener$SuccessResult.complete(SubscribableListener.java:310)
	at org.elasticsearch.action.support.SubscribableListener.tryComplete(SubscribableListener.java:230)
	at org.elasticsearch.action.support.SubscribableListener.setResult(SubscribableListener.java:259)
	at org.elasticsearch.action.support.SubscribableListener.onResponse(SubscribableListener.java:173)
	at org.elasticsearch.action.ActionListenerImplementations$MappedActionListener.onResponse(ActionListenerImplementations.java:95)
	at org.elasticsearch.repositories.blobstore.BlobStoreRepository$9.clusterStateProcessed(BlobStoreRepository.java:2690)
	at org.elasticsearch.cluster.service.MasterService$UnbatchedExecutor.lambda$execute$0(MasterService.java:552)
	at org.elasticsearch.cluster.service.MasterService$ExecutionResult.onPublishSuccess(MasterService.java:927)
	at org.elasticsearch.cluster.service.MasterService$4.onResponse(MasterService.java:374)
	at org.elasticsearch.cluster.service.MasterService$4.onResponse(MasterService.java:369)
	at org.elasticsearch.action.ActionListenerImplementations$RunAfterActionListener.onResponse(ActionListenerImplementations.java:260)
	at org.elasticsearch.action.ActionListener$4.onResponse(ActionListener.java:330)
	at org.elasticsearch.action.support.ContextPreservingActionListener.onResponse(ContextPreservingActionListener.java:32)
	at org.elasticsearch.action.support.ThreadedActionListener$1.doRun(ThreadedActionListener.java:50)
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:983)
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.AssertionError: java.lang.NullPointerException: Cannot invoke "org.elasticsearch.cluster.SnapshotsInProgress$Entry.failure()" because "entry" is null
	... 32 more
Caused by: java.lang.NullPointerException: Cannot invoke "org.elasticsearch.cluster.SnapshotsInProgress$Entry.failure()" because "entry" is null
	at org.elasticsearch.snapshots.SnapshotsService.finalizeSnapshotEntry(SnapshotsService.java:1311)
	... 31 more

```
server/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java
if (changedCount > 0) {
                logger.trace(
                    "changed cluster state triggered by [{}] snapshot state updates and resulted in starting " + "[{}] shard snapshots",
                    changedCount,
                    startedCount
                );
                return updated;
            }
            return existing;
        }
        void completeWithUpdatedState(SnapshotsInProgress snapshotsInProgress) {
            if (updatesByRepo.isEmpty() == false) {
                final var result = new ShardSnapshotUpdateResult(initialState.metadata(), snapshotsInProgress);
                for (final var taskContext : batchExecutionContext.taskContexts()) {
                    if (taskContext.getTask() instanceof ShardSnapshotUpdate task) {
                        taskContext.success(() -> task.listener.onResponse(result));
                    }
                }
            }
        }
        private SnapshotsInProgress.Entry applyToEntry(SnapshotsInProgress.Entry entry, List<ShardSnapshotUpdate> updates) {
            
            
            if (entry.state().completed() || updates.isEmpty()) {
                return entry;
            }
            return new EntryContext(entry, updates).computeUpdatedEntry();
        }
        
        private final class EntryContext {