}
for (int i = 0; i < heads.length; i++) {
boolean neitherRendered = true;
for (int j = 0; j < heads2.length; j++) {
Cell cell = grid.getCell(i, j, orientation);
// check rendered = false
if (cell != null && cell.getComponent().isRendered()) {
neitherRendered = false;
}
// recursion
if (cell instanceof OriginCell) {
OriginCell origin = (OriginCell) cell;
LayoutComponent component = cell.getComponent();
if (component instanceof LayoutContainer) {
LayoutManager layoutManager = ((LayoutContainer) component).getLayoutManager();
// TODO: may be improved
boolean childAuto = origin.getSpan(orientation) == 1 && heads[i].getToken() instanceof AutoLayoutToken;
layoutManager.fixRelativeInsideAuto(orientation, childAuto);