gengrid: fix gengrid item's x, y index updating logic.