Don't rebuild an image more than once when --rebuild-images is used