Fix a bug that occour when there are hidden children in grid_container. The visualization isn't correct due to a wrong calculation of max_col and max_row that mistakenly includes hidden children.