Fix layer ordering when printing objects with different layer heights