issue #22394: write context queries directly against underlying table

select incident_relation.* 
from xm.incident_relation 
join xm.contact on (contact.number = incident_relation.contact) 
where incident_relation.id = $1;

is now

select incident_relation.* 
from xm.incident_relation 
join public.cntct on (public.cntct.cntct_number = incident_relation.contact) 
where incident_relation.id = $1;