Correctly identify primary geo_id

Looks like `||` has a tighter binding than ternary if, which is weird.