The generated parser for ops with type inference calls inferReturnTypes before region resolution and segment attribute resolution, i.e. regions and the segment attributes are not passed to the inferReturnTypes even though it may need that information.
In particular, an op that has sized operand segments which queries those operands in its inferReturnTypes function will crash because the segment attributes hadn't been added yet.