Add index_record to manage this logic in one spot