core/loader: Make the update visit statement more resilient
In case of prepare statement breaking, we still need to update the visit