[PATCH 2/3][image_factory] Automatically use previous targets for rebuild in build_image