remove extra refresh_index() call in apply_patches()