ref_invariant_id table now has a flag for completetion, computation short-circuits if this is marked