Fix incorrect construction of an order next or nested order.