Add a stop-gap fix for the comment rendering.

We add `layers` as a trigger for updating threads.

This probably doesn't address the real issue. If gr-diff gets
re-created but the `changedProperties` in the corresponding update
doesn't contain the trigger for threads, then threads will be missing,
because we add them manually through `appendChild`.

Google-Bug-Id: b/285164720
Release-Notes: skip
Change-Id: Iec70f2cd646952740ca025b289e507b7e798a926
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.ts b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.ts
index ff46351..b67ec4e 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.ts
@@ -461,7 +461,9 @@
     // this method calls getThreadEls which inspects the DOM. Also <gr-diff>
     // only starts observing nodes (for thread element changes) after rendering
     // is done.
-    if (changedProperties.has('threads')) {
+    // Change in layers will likely cause gr-diff to update. Since we add
+    // threads manually we need to call threadsChanged in this case as well.
+    if (changedProperties.has('threads') || changedProperties.has('layers')) {
       this.threadsChanged(this.threads);
     }
   }