fix crash with flag inference with the load instruction