Fixed how order is resolved when providing multiple stacks when writing to sdb