- final ListSchemaNode schema = prototype.getSchema();
- final IdentifiableItemCodec codec = prototype.getFactory().getPathArgumentCodec(bindingClass, schema);
- return schema.isUserOrdered() ? new Ordered<>(prototype, keyMethod, codec)
- : new Unordered<>(prototype, keyMethod, codec);
+ final ListRuntimeType type = prototype.getType();
+ final IdentifiableItemCodec codec = prototype.getFactory().getPathArgumentCodec(bindingClass, type);
+
+ return type.statement().ordering() == Ordering.SYSTEM ? new Unordered<>(prototype, keyMethod, codec)
+ : new Ordered<>(prototype, keyMethod, codec);