I think `objective_mappings` should not be modified, as this would change the result of later calls to `program.get_binding("extended_related_objectives").refresh_instances()`.  Can you test whether this is the case?