fb697a0c3d6910f8acd9725fd420f6cd42be64e9
max
  Wed May 11 16:12:06 2016 -0700
new gbic script, refs #14399

diff --git src/hg/hgTables/intersect.c src/hg/hgTables/intersect.c
index 1294ebd..cd491af 100644
--- src/hg/hgTables/intersect.c
+++ src/hg/hgTables/intersect.c
@@ -33,45 +33,45 @@
 static char *nextVars[] = {hgtaNextIntersectGroup, hgtaNextIntersectTrack,
 	hgtaNextIntersectTable,
 	hgtaNextIntersectOp, hgtaNextMoreThreshold, hgtaNextLessThreshold,
 	hgtaNextInvertTable, hgtaNextInvertTable2,
 	};
 
 /* This is already duplicated in correlate.c and is handy -- should be
  * libified, probably in cart.h. */
 void removeCartVars(struct cart *cart, char **vars, int varCount);
 
 boolean canIntersect(char *db, char *table)
 /* Return true if table exists and is positional. */
 {
 if (isCustomTrack(table) && ctLookupName(table) != NULL)
     return TRUE;
+if (! hTableOrSplitExists(db, table))
+    return FALSE;
 if (isBamTable(table))
     return TRUE;
 if (isBigWigTable(table))
     return TRUE;
 if (isBigBed(database, table, curTrack, ctLookupName))
     return TRUE;
 if (isVcfTable(table, NULL))
     return TRUE;
 if (isHubTrack(table))
     return TRUE;
 if (sameWord(table, WIKI_TRACK_TABLE))
     return TRUE;
-if (hTableOrSplitExists(db, table))
 return isPositional(db, table);
-return FALSE;
 }
 
 boolean anyIntersection()
 /* Return TRUE if there's an intersection to do. */
 {
 boolean specd = (cartVarExists(cart, hgtaIntersectTrack) &&
 		 cartVarExists(cart, hgtaIntersectTable));
 if (specd && canIntersect(database, curTable))
     {
     char *table = cartString(cart, hgtaIntersectTable);
     if (canIntersect(database, table))
 	return TRUE;
     else
 	{
 	/* If the specified intersect table doesn't exist (e.g. if we