Capture/Replay: Test the correct context ID when emitting setup

Fixes: b432c84c2b8cb6d20873e2b33b6684bee76db90d (origin/chromium/5455)
    Capture/Replay: Fix collecting the initialized contexts

Bug: angleproject:7805
Bug: angleproject:7938
Change-Id: Ia321179bef8fd33c7968177ffcb4da78103a99fc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4143840
Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/capture/FrameCapture.cpp b/src/libANGLE/capture/FrameCapture.cpp
index 1fc2173..d1b73d1 100644
--- a/src/libANGLE/capture/FrameCapture.cpp
+++ b/src/libANGLE/capture/FrameCapture.cpp
@@ -8604,7 +8604,7 @@
                 {
                     // Only call SetupReplayContext for secondary contexts that were current before
                     // MEC started
-                    if (mActiveSecondaryContexts.find(context->id().value) !=
+                    if (mActiveSecondaryContexts.find(shareContext->id().value) !=
                         mActiveSecondaryContexts.end())
                     {
                         // TODO(http://anglebug.com/5878): Support capture/replay of