How nice - geom->base_width and geom->base_height are const, so
we have to put them in local copies first