loci: convert internal users away from inheritance union

This mostly affects list accessors.
diff --git a/c_gen/templates/README b/c_gen/templates/README
index 71c4a48..44eedab 100644
--- a/c_gen/templates/README
+++ b/c_gen/templates/README
@@ -60,7 +60,7 @@
     for (i = 1; i <= 4; i++) {
         of_action_output_t action;
         of_action_output_init(&action, flow_add->version, -1, 1);
-        of_list_action_append_bind(&actions, (of_action_t *)&action);
+        of_list_action_append_bind(&actions, &action);
         of_action_output_port_set(&action, i);
     }
 
diff --git a/c_gen/templates/list.c b/c_gen/templates/list.c
index 9ff6e42..d39af9a 100644
--- a/c_gen/templates/list.c
+++ b/c_gen/templates/list.c
@@ -42,12 +42,12 @@
  */
 
 int
-${cls}_first(${cls}_t *list, ${e_cls}_t *_obj)
+${cls}_first(${cls}_t *list, of_list_iter_t iter)
 {
     int rv;
-    of_object_t *obj = (of_object_t *)_obj;
+    of_object_t *obj = iter.obj;
 
-    ${e_cls}_init(_obj, list->version, -1, 1);
+    ${e_cls}_init(obj, list->version, -1, 1);
 
     if ((rv = of_list_first(list, obj)) < 0) {
         return rv;
@@ -73,10 +73,10 @@
  */
 
 int
-${cls}_next(${cls}_t *list, ${e_cls}_t *_obj)
+${cls}_next(${cls}_t *list, of_list_iter_t iter)
 {
     int rv;
-    of_object_t *obj = (of_object_t *)_obj;
+    of_object_t *obj = iter.obj;
 
     if ((rv = of_list_next(list, obj)) < 0) {
         return rv;
@@ -105,9 +105,9 @@
  */
 
 int
-${cls}_append_bind(${cls}_t *list, ${e_cls}_t *obj)
+${cls}_append_bind(${cls}_t *list, of_list_iter_t iter)
 {
-    return of_list_append_bind(list, (of_object_t *)obj);
+    return of_list_append_bind(list, iter.obj);
 }
 
 /**
@@ -119,7 +119,7 @@
  */
 
 int
-${cls}_append(${cls}_t *list, ${e_cls}_t *obj)
+${cls}_append(${cls}_t *list, of_list_iter_t iter)
 {
-    return of_list_append(list, (of_object_t *)obj);
+    return of_list_append(list, iter.obj);
 }
diff --git a/c_gen/templates/of_utils.c b/c_gen/templates/of_utils.c
index 373ad59..bddbc8d 100644
--- a/c_gen/templates/of_utils.c
+++ b/c_gen/templates/of_utils.c
@@ -54,7 +54,7 @@
 int
 of_action_list_has_out_port(of_list_action_t *actions, of_port_no_t outport)
 {
-    of_action_t elt;
+    of_object_t elt;
     of_action_output_t *output;
     int loop_rv;
     of_port_no_t port_no;
@@ -64,7 +64,7 @@
         return 1;
     }
 
-    output = &elt.output;
+    output = &elt;
     OF_LIST_ACTION_ITER(actions, &elt, loop_rv) {
         if (output->object_id == OF_ACTION_OUTPUT) {
             of_action_output_port_get(output, &port_no);