ef39e447f159ff068789ce02e4a658b7bad9caec
angie
  Wed Mar 7 16:15:27 2018 -0800
checkAddHighlight also needs to be run after tracksDisplay because it may call findGenomePos which may set addHighlight again.  refs #21056

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 8b9a6fa..a1f78d1 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -10082,30 +10082,31 @@
     configPageSetTrackVis(-2);
     }
 else
     {
     tracksDisplay();
     }
 
 if (cartVarExists(cart, "hgt.convertChromToVirtChrom"))
     {
     cartRemove(cart, "hgt.convertChromToVirtChrom");
     return;
     }
 
 jsonObjectAdd(jsonForClient, "measureTiming", newJsonBoolean(measureTiming));
 // js code needs to know if a highlightRegion is defined for this db
+checkAddHighlight(); // call again in case tracksDisplay's call to findGenomePos changed vars
 char *highlightDef = cartOptionalString(cart, "highlight");
 if (highlightDef && startsWith(database,highlightDef) && highlightDef[strlen(database)] == '.')
     jsonObjectAdd(jsonForClient, "highlight", newJsonString(highlightDef));
 jsonObjectAdd(jsonForClient, "enableHighlightingDialog",
 	      newJsonBoolean(cartUsualBoolean(cart, "enableHighlightingDialog", TRUE)));
 
 struct dyString *dy = dyStringNew(1024);
 jsonDyStringPrint(dy, (struct jsonElement *) jsonForClient, "hgTracks", 0);
 jsInline(dy->string);
 dyStringFree(&dy);
 
 if (measureTiming)
     measureTime("Time at end of doMiddle, next up cart write");
 
 if (cartOptionalString(cart, "udcTimeout"))