Fix showing incorrect related records on the portal objects when adding a related record just after adding a record of the main table