This is the only branch in which the `rect` and `size` variables are used, so move their declarations and everything that touches them here.