loci: replace indirect wire_length_get calls

All objects of the same inheritance tree use the same wire length accessors. We
know what inheritance tree we're working with, so generate a direct call.
diff --git a/c_gen/templates/list.c b/c_gen/templates/list.c
index 95b0276..5ce3e96 100644
--- a/c_gen/templates/list.c
+++ b/c_gen/templates/list.c
@@ -57,8 +57,8 @@
     ${e_cls}_wire_object_id_get(obj, &obj->object_id);
 :: #endif
 
-:: if has_wire_length:
-    loci_class_metadata[obj->object_id].wire_length_get(obj, &obj->length);
+:: if wire_length_get != 'NULL':
+    ${wire_length_get}(obj, &obj->length);
 :: else:
     obj->length = of_object_fixed_len[obj->version][obj->object_id];
 :: #endif
@@ -88,8 +88,8 @@
     ${e_cls}_wire_object_id_get(obj, &obj->object_id);
 :: #endif
 
-:: if has_wire_length:
-    loci_class_metadata[obj->object_id].wire_length_get(obj, &obj->length);
+:: if wire_length_get != 'NULL':
+    ${wire_length_get}(obj, &obj->length);
 :: else:
     obj->length = of_object_fixed_len[obj->version][obj->object_id];
 :: #endif