Added safety check to enforce that nodes are layed out in the same order as they are requested
Fixed layout order in previous direction