Optlang: Fix ref cases for nested_run