The evolution of the spatial structure of thick-target hard X-ray emission in solar flares