Change createInferredCast calls to more accurate cast creation calls.